Skip to main content
Every endpoint page in this tab is generated from one OpenAPI file, and every page has a Try it playground that calls the live API with your key.

Base URL and authentication

Send your API key as a bearer token: Authorization: Bearer YOUR_API_KEY. Create a key in the dashboard. See Authentication.

OpenAPI spec

The spec behind this reference is public, in OpenAPI 3.1 (YAML):
It is the same file these pages are built from, so it always matches the reference. Links in its descriptions, such as /inference/models, are relative to https://docs.primalabs.ai. Use it to:
  • Import the API into Postman or Insomnia. In Postman, choose Import and paste the URL. In Insomnia, choose Import and import from the URL.
  • Generate a client with a tool such as openapi-generator. For chat, you don’t need one: the OpenAI SDKs work unmodified (see the Quickstart).
  • Download it:
The spec lists the parameters we document and test. Other OpenAI parameters aren’t tested: depending on the model, one may be dropped silently, ignored, or rejected. /messages and /responses take the Anthropic and OpenAI Responses formats as-is, so their pages show a working example rather than the full upstream schema.

The Try it playground

Paste your API key into the playground, edit the example request, and press Send. Your browser sends the request directly to api.primalabs.ai; it doesn’t go through a third-party proxy.
Playground requests are real API calls and use your rate limits. Inference requests (chat, completions, messages, responses) are billed to your balance like any other request, and with a zero balance they fail with 422 (budget_exceeded); see Errors. GET /models and GET /credits are free and still work at a zero balance.