This API calls models hosted by Serverless Inference. To manage Dedicated Inference gateways, deployments, and capacity claims, see the Dedicated Inference API reference. To compare Serverless Inference, Dedicated Inference, and Inference on CKS, see About CoreWeave Inference.
Base URL
Access the Serverless Inference service at:Prerequisites
To call the Serverless Inference API, you need:- Access to Serverless Inference in Forge.
- One of the credentials described in Authentication.
[YOUR-TEAM]/[YOUR-PROJECT]. If you don’t specify these, Serverless Inference uses your default team and the project name inference.
Available methods
The Serverless Inference API provides OpenAI-compatible endpoints for interacting with foundation models. The following methods are available:- Chat Completions: Create chat completions using foundation models.
- List Models: Get all available models and their IDs.
Authentication
Authenticate with a Forge API key or a federated access token.- Create an API key in Forge settings. For the OpenAI Python client, set the
api_keyparameter. For direct API calls, sendAuthorization: Bearer API_KEY. - To exchange your application’s existing identity token for a bearer credential, see Authenticate serverless inference with workload identity federation.
Error handling
For a complete list of error codes and how to resolve them, see API errors.Next steps
- Try the usage examples to see how the API works.
- Explore models in the Serverless Inference UI.
- Check usage limits for your account.