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

# API reference

The exact shapes: endpoints, headers, status codes and bodies, for the reader who already has it working.

The exact shapes, for the reader who already has it working: endpoints, headers, status codes, bodies and field rules, the things somebody writes an `if` against. This section is for the gateway's API reference, generated from its OpenAPI description, `openapi.json`, one page per operation, and for the wire of the Baseline package, the passive tap.

- [The Baseline package (the passive tap)](https://docs.recovea.ai/reference/passive-tap/) The wire the Baseline package runs on: one endpoint, a bearer tap key, the fifteen-field event, and what the server answers.

## [OpenAI-compatible](https://docs.recovea.ai/reference/openai-compatible/)

Base URL `https://api.recovea.ai/v1`

- [Create a chat completion](https://docs.recovea.ai/reference/openai-compatible/chat-completions/) POST /v1/chat/completions
- [Create a completion](https://docs.recovea.ai/reference/openai-compatible/completions/) POST /v1/completions
- [Create embeddings](https://docs.recovea.ai/reference/openai-compatible/embeddings/) POST /v1/embeddings
- [Create a response](https://docs.recovea.ai/reference/openai-compatible/responses/) POST /v1/responses
- [List models](https://docs.recovea.ai/reference/openai-compatible/list-models/) GET /v1/models
- [Any other OpenAI path](https://docs.recovea.ai/reference/openai-compatible/openai-passthrough/) ANY /v1/{path}

## [Anthropic](https://docs.recovea.ai/reference/anthropic/)

Base URL `https://api.recovea.ai`

- [Create a message](https://docs.recovea.ai/reference/anthropic/messages/) POST /v1/messages
- [Paths under /v1/messages](https://docs.recovea.ai/reference/anthropic/messages-subpaths/) ANY /v1/messages/{path}
- [Create a message (earlier spelling)](https://docs.recovea.ai/reference/anthropic/messages-alias/) POST /anthropic/v1/messages
- [Any other Anthropic path (earlier spelling)](https://docs.recovea.ai/reference/anthropic/anthropic-alias-passthrough/) ANY /anthropic/v1/{path}

## [Declared upstreams](https://docs.recovea.ai/reference/declared-upstreams/)

Base URL `https://api.recovea.ai/upstream/v1`

- [Forward to your declared upstream](https://docs.recovea.ai/reference/declared-upstreams/upstream-passthrough/) ANY /upstream/v1/{path}

## A URL the gateway does not route

### 404 Not Found

The answer for a path outside every pattern in this document, under the OpenAI convention for an unknown URL.

| Header | Description |
| --- | --- |
| `x-recovea-request-id` string required | The gateway's id for this request: `req_` and 32 hex characters. On every response the gateway sends, forwarded or refused. Quote it when you ask about a request. |
| `x-request-id` string required | On a forwarded response, the provider's own request id, passed through untouched. On a response the gateway originates, a `req_` id the gateway fills in; it is not the same value as `x-recovea-request-id`. |

| Field | Description |
| --- | --- |
| `error` object required |  |
| `error.message` string required |  |
| `error.type` string required |  |
| `error.param` string or null required |  |
| `error.code` string required |  |

```http
HTTP/1.1 404 Not Found

{
  "error": {
    "message": "Unknown request URL: GET /no/such/route.",
    "type": "invalid_request_error",
    "param": null,
    "code": "unknown_url"
  }
}
```
