Core
Supported endpoints
The five API routes and the models that each route serves. Also the key headers, the two error formats, idempotency and the cost block.
The API accepts three request formats on one host. Each model works only in the formats that this table shows. We make the table from our model catalogue each time that you open this page.
| Route | Format | Key | Errors | Models | Cost |
|---|---|---|---|---|---|
POST /v1/chat/completions | OpenAI chat completions | Authorization: Bearer or x-api-key | OpenAI | claude-opus-5-5, claude-opus-5, claude-sonnet-5-5, claude-sonnet-5, claude-haiku-4-5-20251001, claude-fable-5-1, gpt-5.5, gpt-6.1-sol, gpt-5, gemini-3.1-pro-preview, gemini-3.5-flash, glm-5.3, qwen3.8-max, deepseek-v4.1-flash | Billed per token |
POST /v1/messages | Anthropic Messages | Authorization: Bearer or x-api-key | Anthropic | claude-opus-5-5, claude-opus-5, claude-sonnet-5-5, claude-sonnet-5, claude-haiku-4-5-20251001, claude-fable-5-1, glm-5.3, deepseek-v4.1-flash | Billed per token |
POST /v1/messages/count_tokens | Anthropic Messages | Authorization: Bearer or x-api-key | Anthropic | claude-opus-5-5, claude-opus-5, claude-sonnet-5-5, claude-sonnet-5, claude-haiku-4-5-20251001, claude-fable-5-1, glm-5.3, deepseek-v4.1-flash | No charge |
POST /v1/responses | OpenAI Responses | Authorization: Bearer or x-api-key | OpenAI | gpt-5.5, gpt-6.1-sol, gpt-5 | Billed per token |
GET /v1/models | OpenAI and Anthropic list | None | OpenAI | Every model | No charge |
GET /v1/models/{id} | One model | None | OpenAI | Every model | No charge |
A request for a model on an endpoint that does not serve it gets a 400 error before we charge
money. The error message names the endpoint to use:
{
"error": {
"message": "Model \"claude-sonnet-5-5\" is not served on /v1/responses. Use /v1/messages or /v1/chat/completions.",
"type": "invalid_request_error",
"param": "model",
"code": "unsupported_endpoint",
"details": { "served_on": ["/v1/messages", "/v1/chat/completions"] }
}
}
Base URL
| Client | Base URL |
|---|---|
| OpenAI SDKs, OpenCode, Codex | https://api.kontinentai.com/v1 |
| Anthropic SDKs, Claude Code | https://api.kontinentai.com |
The OpenAI clients add /chat/completions or /responses to the base URL. The Anthropic clients add
/v1/messages.
Key headers
Each endpoint that costs money accepts the key in one of two headers:
Authorization: Bearer sk-kont-...
x-api-key: sk-kont-...
The OpenAI SDKs send the first header. The Anthropic SDKs send the second header. Claude Code sends
the first header with ANTHROPIC_AUTH_TOKEN and the second header with ANTHROPIC_API_KEY.
GET /v1/models needs no key. See Authentication.
Request bodies
/v1/chat/completionsreads the body and makes a new request from it. It accepts only the parameters on Chat completions. It refuses a different parameter with a400error that names the parameter./v1/messagesand/v1/responsessend your body to the model as you wrote it. We change onlymodel. On the starter balance, we also lowermax_tokensormax_output_tokensto 4,096. The model makes the decision about the other fields.
/v1/messages needs model, max_tokens and messages. /v1/messages also sends your
anthropic-version and anthropic-beta headers to the model.
Errors
The error format agrees with the format of the endpoint, so that the error classes of each SDK work.
/v1/chat/completions, /v1/responses and /v1/models use the OpenAI format:
{
"error": {
"message": "Insufficient balance: $0.001230 required, $0.000400 available",
"type": "insufficient_quota",
"param": null,
"code": "INSUFFICIENT_BALANCE"
}
}
/v1/messages and /v1/messages/count_tokens use the Anthropic format:
{
"type": "error",
"error": {
"type": "billing_error",
"message": "Insufficient balance: $0.001230 required, $0.000400 available"
},
"request_id": "req_8f2a1c"
}
The HTTP status is the same in the two formats. For the list of statuses, see Errors.
Idempotency
Send an Idempotency-Key header to make a retry safe. The rules are the same on
/v1/chat/completions, /v1/messages and /v1/responses:
- The header works only on a request without
stream: true. - A request with the header and
stream: truegets a400error with the codeidempotency_unsupported_for_stream. - A repeat of a completed request gets the first response again, with the header
Idempotent-Replay: true. We do not charge for the repeat.
See Idempotency.
The cost block
A response without stream: true has a kontinent block. The block is at the top level of the JSON,
so the SDKs ignore it:
"kontinent": {
"request_id": "req_8f2a1c",
"cost_micros": 13,
"cost_usd": 0.000013,
"list_price_usd": 0.000061,
"saved_usd": 0.000048
}
| Field | What it is |
|---|---|
request_id | The id of the request. The x-request-id header has the same value |
cost_micros | The cost of the request in micro-dollars. One micro-dollar is $0.000001. This is the amount that we take from your balance |
cost_usd | The same cost in US dollars |
list_price_usd | The cost of the same tokens at the official price of the maker |
saved_usd | list_price_usd minus cost_usd |