canonical: https://jentic.com/apis/nvcf.nvidia.com/nvidia-cloud-functions

# Nvcf Nvidia NVIDIA Cloud Functions

NVIDIA Cloud Functions (NVCF) is a serverless GPU runtime that lets teams package containers and trained models as functions and invoke them through HTTP and streamed responses. The 36-endpoint API covers the full lifecycle: registering a function and version, deploying it onto GPU capacity, calling it via the polling-execute (pexec) and synchronous-execute (exec) paths, listing deployments, and tearing them down. It targets workloads such as LLM inference, image and video generation, and ML training pipelines that need on-demand GPU compute without managing the underlying cluster.

## For AI agents

Deploy and invoke GPU-backed serverless functions on NVIDIA's NVCF platform with bearer authentication, including streamed and polling execution patterns.

## Scope

Does not handle model training, dataset storage, or non-GPU compute - use for serverless GPU function deployment and invocation only.

## Capabilities

- Register new functions and versions to wrap containers or models for invocation
- Deploy a function version onto GPU capacity with configurable scaling parameters
- Invoke a function synchronously through the exec endpoints for low-latency calls
- Invoke a function via pexec for long-running jobs that return a status URL to poll
- Update a deployment's scaling configuration and tear down deployments when idle
- Stream responses from generative model functions back to the caller

## Use cases

### Serverless LLM Inference

Run an open-source LLM behind an HTTP endpoint without managing a GPU cluster. Wrap the model server in a container, register it as a function version, deploy it onto NVCF capacity, and invoke it via `/v2/nvcf/exec` for low-latency requests or `/v2/nvcf/pexec` for batched jobs. Deployment is typically a few hours from a working container image, and idle deployments can be torn down to control cost.

Example prompt: Call POST `/v2/nvcf/deployments/functions/{functionId}/versions/{functionVersionId}` with the chosen GPU type, then POST `/v2/nvcf/exec/functions/{functionId}` with a prompt payload and return the completion.

### Long-Running Generative Jobs

Handle workloads such as video generation or batched embeddings where individual jobs take minutes by using the pexec invocation pattern. The API returns an invocation id and a status URL the caller polls until the result is ready, freeing the client from holding open connections. This is well suited to creative pipelines and offline ML batch jobs.

Example prompt: POST `/v2/nvcf/pexec/functions/{functionId}` with the input payload, then poll the returned status URL every five seconds until completion and return the result.

### Cost-Aware Deployment Lifecycle

Keep GPU spend in check by deploying functions only when needed and tearing them down on a schedule or when traffic drops. The deployment endpoints support create, retrieve, update, and delete on a function-version pair, so a controller process can run scale-to-zero or off-hours teardown logic. Pair with monitoring on invocation counts to drive the policy.

Example prompt: List deployments, identify any with zero invocations in the last hour, and DELETE `/v2/nvcf/deployments/functions/{functionId}/versions/{functionVersionId}` for each match.

### Agent-Driven Inference Routing

Let an AI agent route incoming requests to the right NVCF deployment - for example picking a small fast model for short prompts and a larger one for complex prompts - by listing deployments and invoking the appropriate function. Through Jentic, the agent searches by intent and gets only the operations it needs, with credentials handled by the platform.

Example prompt: Search Jentic for 'invoke an NVCF function', load the operation, and call the chosen function id with the user's prompt.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v2/nvcf/deployments/functions/{functionId}/versions/{functionVersionId}` | Deploy a function version onto GPU capacity |
| GET | `/v2/nvcf/deployments/functions/{functionId}/versions/{functionVersionId}` | Get function deployment details |
| PUT | `/v2/nvcf/deployments/functions/{functionId}/versions/{functionVersionId}` | Update a function deployment |
| DELETE | `/v2/nvcf/deployments/functions/{functionId}/versions/{functionVersionId}` | Delete a function deployment |
| POST | `/v2/nvcf/exec/functions/{functionId}` | Invoke a function synchronously |
| POST | `/v2/nvcf/pexec/functions/{functionId}` | Invoke a function with polling-execute |

## Key resources

- **Functions and Versions** — Register and version containerised functions for GPU invocation.
- **Deployments** — Provision GPU capacity for a function version with scaling configuration.
- **Synchronous Execution (exec)** — Low-latency invocation that returns the response inline.
- **Polling Execution (pexec)** — Long-running invocation that returns an invocation id and status URL.

## Why Jentic

- **Setup:** Wiring NVIDIA Cloud Functions by hand means setting up its bearer key auth against api.nvcf.nvidia.com and handling the deployment and invocation request plumbing yourself. Through Jentic you install once, import NVIDIA Cloud Functions from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** NVCF puts the function id and version id in the URL path (`/v2/nvcf/deployments/functions/{functionId}/versions/{functionVersionId}`), so a rule can pin your agent to the operations it needs on one function: it can invoke and read while a destructive operation like delete is not included unless you add it. You choose the operations it may call.
- **Credential handling:** Your NVCF bearer key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'invoke an NVCF function' or 'deploy an NVCF function version', and Jentic returns the matching NVCF operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Replicate API** — Hosted GPU model platform with public model gallery and pay-per-second billing.
- **Hugging Face Inference API** — Serverless inference for Hugging Face Hub models, mostly CPU and shared GPU.
- **OpenAI API** — Managed frontier-model inference without any deployment step on the customer side.
- **AWS API** — Pair with NVCF for object storage, queues, and IAM that sit upstream and downstream of inference.

## FAQ

### What authentication does the NVIDIA Cloud Functions API use?

The API uses bearer-token authentication. You generate an API key in NVIDIA's NGC portal and pass it in the Authorization header as 'Bearer <key>' on every call. Through Jentic, the bearer key is stored encrypted in the vault and injected at execution time.

### When should I use exec versus pexec?

Use POST `/v2/nvcf/exec/functions/{functionId}` for short, latency-sensitive calls where you can hold the connection open. Use POST `/v2/nvcf/pexec/functions/{functionId}` for long-running jobs - it returns an invocation id and a status URL you poll until the result is ready.

### What are the rate limits for NVCF?

The spec does not embed explicit limits; throughput is governed by the GPU capacity attached to each deployment. If your workload bursts, scale the deployment via PUT `/v2/nvcf/deployments/functions/{functionId}/versions/{functionVersionId}` or split traffic across versions.

### How do I tear down an idle deployment through Jentic?

Run pip install jentic, then search for 'delete an NVCF deployment'. Jentic returns DELETE `/v2/nvcf/deployments/functions/{functionId}/versions/{functionVersionId}` with its input schema; pass the function and version ids and execute. Run it through Jentic One, the self-hosted execution layer, to get an agent API key.

### Can I host my own container on NVCF?

Yes - the function-and-version model wraps a container image. Register a function, register a version that points at your image, then deploy it onto GPU capacity. The exec and pexec endpoints route requests into the container's HTTP server.

### Can I limit what my agent is allowed to do with the NVIDIA Cloud Functions API?

Yes. Because you run Jentic One yourself, your own rules decide which NVCF operations and credentials the agent may use, and NVCF puts the function id and version id in the URL path, so you can pin the agent to one function. You can allow it to invoke via POST `/v2/nvcf/exec/functions/{functionId}` and POST `/v2/nvcf/pexec/functions/{functionId}` and read deployment details with GET on the deployment path, while leaving out the destructive DELETE on `/v2/nvcf/deployments/functions/{functionId}/versions/{functionVersionId}` unless you add it. You choose the operations it may call and the bearer key it may use.
