---
title: "Call Function"
method: POST
path: "/v2/nvcf/pexec/functions/{functionId}"
tags: ["Function Invocation"]
---

# Call Function

`POST /v2/nvcf/pexec/functions/{functionId}`

Invokes the specified function that was successfully deployed. If the version  is not specified, any active function versions will handle the request. If  the version is specified in the URI, then the request is exclusively processed  by the designated version of the function. By default, this endpoint will block  for 5 seconds. If the request is not fulfilled before the timeout, it's status  is considered in-progress or pending and the response includes HTTP status code  202 with an invocation request ID, indicating that the client should commence  polling for the result using the invocation request ID. Access to this endpoint  mandates inclusion of either a bearer token or an api-key with 'invoke_function'  scope in the HTTP Authorization header. Additionally, this endpoint has the  capability to provide updates on the progress of the request, contingent  upon the workload's provision of such information. In-progress responses are returned in order. If no in-progress response is received  during polling you will receive the most recent in-progress response. Only the first  256 unread in-progress messages are kept.

## Path parameters

- `functionId` string, uuid, required

## Headers

- `NVCF-INPUT-ASSET-REFERENCES` string[]
- `NVCF-POLL-SECONDS` integer

## Request body

- object

## Response `200`

Invocation is fulfilled

- object
  - `short` integer
  - `char` string
  - `int` integer
  - `long` integer
  - `float` number, float
  - `double` number, double
  - `direct` boolean
  - `readOnly` boolean

## Other responses

- `202` — Result is pending. Client should poll using the requestId.
- `302` — Client should use the URL specified in the 'Location' response header to fetch large result.
- `402` — Cloud credits expired for public functions. Please contact NVIDIA representatives.
- `403` — Either missing scope in the auth(SSA JWT / SAK) token and/or missing resource entry in the SAK for the function.
- `429` — Client is doing too many requests per second and should slow down request rate.

---

[API](https://skmtc.dev/brevdev/apis/cloud-functions.md) · [All operations](https://skmtc.dev/brevdev/apis/cloud-functions/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/brevdev/cloud-functions/revisions/add37b001ffc/schema)
