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

# API reference

> Base URL, authentication, the headers on every response, and what is on this tab.

Everything on this tab is generated from the API's own specification, so a parameter listed
here is a parameter the service accepts today.

## Base URL

```
https://compute.prentis.ai/v1
```

Anthropic SDKs append `/v1/messages` themselves, so give them the origin
(`https://compute.prentis.ai`) rather than the base above.

## Authentication

```bash theme={null}
Authorization: Bearer $PRENTIS_API_KEY
```

`/v1/messages` also accepts `x-api-key: $PRENTIS_API_KEY`. See
[Authentication](/authentication).

## Endpoints

|                                                             |                                                                  |
| ----------------------------------------------------------- | ---------------------------------------------------------------- |
| [`POST /chat/completions`](/api-reference/chat-completions) | The one you want. OpenAI-compatible, streaming or not.           |
| [`POST /completions`](/api-reference/completions)           | Legacy text completion, for prompts that are not a conversation. |
| [`POST /messages`](/api-reference/messages)                 | Anthropic-compatible. Same models, Anthropic's wire format.      |
| [`GET /models`](/api-reference/list-models)                 | What this key can call.                                          |
| [`GET /models/{model}`](/api-reference/get-model)           | One model by id.                                                 |

## On every response

| Header             |      Always?     | What it is                                                                                                                      |
| ------------------ | :--------------: | ------------------------------------------------------------------------------------------------------------------------------- |
| `x-request-id`     |      **yes**     | The handle that reaches the whole path your request took, on successes and errors alike. Quote it when you ask us about a call. |
| `x-provider-class` |    on success    | `primary` or `fallback` — whether you got the first choice or a standby. It never names who served it.                          |
| `x-config-version` |    on success    | Which routing configuration was in effect. Useful only when comparing two calls that behaved differently.                       |
| `Retry-After`      | on `429` / `503` | Seconds to wait. Honour it before falling back to your own backoff.                                                             |

## Two conventions worth knowing before you read on

**Unknown parameters are ignored, not rejected.** Sending an OpenAI parameter this API does
not implement will not fail your call. The exceptions are marked **not supported** on each
endpoint — those return `INVALID_REQUEST`, because silently ignoring them would change the
answer in a way you could not detect.

**Errors are OpenAI-shaped, and `code` is the stable part.** Messages get reworded; codes
are append-only and a retired one is never reused. Branch on `error.code`. The full list is
on [Errors](/errors).
