> This page is for version Preview (default).
> For other versions, use one of these documentation indexes:
> - Preview (default): https://docs.preview.paid.ai/preview/llms.txt
> - Current: https://docs.preview.paid.ai/current/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.preview.paid.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.preview.paid.ai/_mcp/server.

# Make your first request

> Call the Paid API with your API key and the version header, read the response, and fix the errors a first request can hit.

The Paid API lives at `https://api.paid.ai/v1`. It takes and returns JSON over HTTPS. You need an API key from [Set up your account](/get-started/set-up-your-account), exported as `PAID_API_KEY`.

## The headers every request sends

| Header          | Value                                                                                                                                 |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `Authorization` | `Bearer` and your API key.                                                                                                            |
| `Paid-Version`  | The dated version your code was written against, such as `2026-11-01`. A later version can then never change what your code receives. |

## Send the request

Your first request [gets your account's API version](../api-reference/account/api-version/get). It reads your settings and changes nothing, so it's a safe way to check your key:

**`GET /v1/api-version`**

```bash title="GET /v1/api-version"
curl https://api.paid.ai/v1/api-version \
  -H "Authorization: Bearer $PAID_API_KEY" \
  -H "Paid-Version: 2026-11-01"
```

**`Response`**

```json title="Response"
{
  "object": "api_version",
  "available": [
    { "version": "2026-11-01", "releasedAt": "2026-11-01T00:00:00Z" }
  ],
  "latest": "2026-11-01",
  "pinned": "2026-11-01",
  "pinnedAt": null,
  "previous": null,
  "rollbackAvailableUntil": null
}
```

`pinned` is the version your account uses for a request that sends no `Paid-Version`, and `latest` is the newest version. Send `Paid-Version` on every request anyway, so upgrading the account's version never changes what your code receives. [Versioning](/developers/api/versioning) explains how to move to a new version.

## If the request fails

Every error has the same JSON body. `code` says what went wrong, and `docUrl` links to how to fix it:

**`401 Unauthorized`**

```json title="401 Unauthorized"
{
  "error": {
    "type": "authentication_error",
    "code": "unauthorized",
    "message": "Unauthorized",
    "requestId": "req_8f3a2c",
    "docUrl": "https://docs.paid.ai/preview/developers/api/errors#unauthorized"
  }
}
```

The errors a first request is most likely to hit:

| Status | Code              | What to check                                                                                                       |
| ------ | ----------------- | ------------------------------------------------------------------------------------------------------------------- |
| `401`  | `unauthorized`    | The key is missing, mistyped or revoked. Send it as `Authorization: Bearer <key>`, with nothing else in the header. |
| `400`  | `invalid_version` | `Paid-Version` isn't a released version. Use one from `available`, written `YYYY-MM-DD`.                            |

[Errors](/developers/api/errors) lists every code and what to do about it.

## Headers you'll meet next

* `Paid-Beta` switches on a feature that's in beta. Customers, for example, need `Paid-Beta: customers=v1`. See [Betas and stability](/developers/api/betas-and-stability).
* `Idempotency-Key` makes a create or update safe to retry: send a new unique value with every `POST` and `PATCH`. See [Idempotency](../api-reference/idempotency).

## Next steps

* [Create a customer](/get-started/quickstarts/create-a-customer): your first write to the API.
* [Examples](/get-started/quickstarts/overview): complete pricing set-ups, from a catalog to an invoice.