> ## Documentation Index
> Fetch the complete documentation index at: https://docs.primalabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> The PrimaLabs Inference API reference: base URL, authentication, the OpenAPI spec, and how the playground works.

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

```
https://api.primalabs.ai/v1
```

Send your API key as a bearer token: `Authorization: Bearer YOUR_API_KEY`. Create a key
in the [dashboard](https://dashboard.primalabs.ai). See
[Authentication](https://docs.primalabs.ai/inference/authentication.md).

## OpenAPI spec

The spec behind this reference is public, in OpenAPI 3.1 (YAML):

```
https://docs.primalabs.ai/api-reference/inference/openapi.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](https://docs.primalabs.ai/inference/quickstart.md)).
* **Download it:**

  ```bash theme={null}
  curl -sSO https://docs.primalabs.ai/api-reference/inference/openapi.yaml
  ```

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.

> [!WARNING]
>
> 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](https://docs.primalabs.ai/inference/errors.md). `GET /models` and `GET /credits` are free and still work at
> a zero balance.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.