# Compatibility notes

> Where router.africa differs from the OpenAI API and from OpenRouter, so code you move over behaves as you expect.

Source: https://router.africa/docs/compatibility-notes

router.africa works with the OpenAI SDK and the Anthropic SDK when you change the base URL and the key. Request fields that this site doesn't mention are passed through as the model's API defines them. This page lists where we differ.

## Endpoints

You can call:

- `POST /v1/chat/completions`, with and without streaming
- `POST /v1/messages`, in the Anthropic format (see [Messages](https://router.africa/docs/messages))
- `POST /v1/responses`, in the OpenAI Responses format (see [Responses](https://router.africa/docs/responses))
- `GET /v1/models`
- `GET /v1/key`
- `GET /v1/generation` (see [Look up a request](https://router.africa/docs/generation))

Other endpoints are not part of the public API, even if a path seems to answer. This includes the OpenAI batch API, embeddings, images, audio and rerank.

## Not supported

If you are coming from OpenRouter, these features don't exist here:

| Feature | Status |
|---|---|
| `:free`, `:nitro` and `:floor` model variants | Not supported. |
| `~alias` model names | Not supported. Use the full model id. |
| Routers such as `openrouter/auto`, `pareto-router` and `fusion` | Not supported. |
| `provider` preferences, `sort`, `plugins` and `route` request fields | Not supported. |
| `models[]` and `fallbacks` arrays, and `session_id` sticky routing | Not supported. |
| Presets | Not supported. |
| Bring your own provider keys | Not supported. |
| Workload identity tokens (`/oauth/token`) | Not supported. |
| Attribution headers | Not used. |
| Batch or async endpoint | Not available. |
| Management APIs for keys, workspaces and guardrails | Use the dashboard. They are not part of the API. |
| Regional hostnames and data-region routing | Not available. |
| Reading stored prompts and responses through the API | Not available. Admins read them in the dashboard. |

{/* TODO: describe what the API returns when a request includes an unsupported field (rejected, or ignored). Not decided in the sources. */}

## Behaviour that differs

- **Credits, not currency.** You pay with credits. A request that can't be paid for returns `402`, not `429`. OpenAI uses `429` for this, which the SDKs retry. A `402` isn't retried. See [Credits and billing](https://router.africa/docs/credits-and-billing).
- **Error body.** Errors use OpenRouter's envelope: `error.code` is a number, and `error.metadata.reason` gives the specific cause. The SDKs work unchanged. On `POST /v1/messages` errors use Anthropic's format instead. See [Errors](https://router.africa/docs/errors).
- **Rate-limit headers.** Only `Retry-After` is sent. There are no `x-ratelimit-*` headers.
- **Anthropic SDK.** Use the default `api_key` (`apiKey` in TypeScript). `POST /v1/messages` accepts `x-api-key` as well as `Authorization: Bearer`. No other endpoint accepts `x-api-key`.
- **Generation lookup.** `GET /v1/generation` returns metadata only. OpenRouter's `/generation/content` and `provider_responses[]` don't exist here.
- **Headers we ignore.** `OpenAI-Organization`, `OpenAI-Project` and `OpenAI-Beta` are accepted and ignored.
- **Idempotency.** Duplicate requests are caught automatically, and `Idempotency-Key` is an extension. See [Idempotency and retries](https://router.africa/docs/idempotency-and-retries).
- **`max_tokens`.** A value above the model's limit is lowered to the limit, on `max_output_tokens` too. It isn't an error.
- **Models.** A model must be switched on, allowed for your key and have a published rate. Otherwise you get one `404` for all three cases.
- **Data.** Prompts and responses are not saved unless a workspace turns saving on. See [Data and privacy](https://router.africa/docs/data-and-privacy).
