API formats, limits and errors
One host, three request formats, one key. This page is the overview; the API reference has every endpoint, error code and header.
Endpoints
Use the format your tool already speaks. One key, one balance, one set of limits.
- Anthropic Messages
POST /v1/messages· base URLhttps://api.6bee.ai. For Claude Code and the Anthropic SDK. Auth with x-api-key or a Bearer token. Errors come back in Anthropic’s format.- OpenAI Responses
POST /v1/responses· base URLhttps://api.6bee.ai/v1. For Codex. Send the full input each turn. store, previous_response_id and WebSocket mode are not supported.- OpenAI Chat Completions
POST /v1/chat/completions· base URLhttps://api.6bee.ai/v1. For OpenCode, Cherry Studio, Cline and OpenAI SDKs. Auth with a Bearer token. List models with GET /v1/models.- Models
GET /v1/modelsreturns the model IDs your key can use.
All three stream over server-sent events.
Authentication
Create a key in the console. Send it as Authorization: Bearer <your key>. The Anthropic format also accepts the x-api-key header.
curl https://api.6bee.ai/v1/chat/completions \
-H "Authorization: Bearer $SIXBEE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "<model id>", "stream": true, "max_tokens": 2048,
"messages": [{"role": "user", "content": "Write a unit test for fizzbuzz"}]}' Limits
Beta limits apply per account, across all of its keys.
- Context
- Input plus output up to the model’s window: 128K to 1M tokens, depending on the model.
- Output
- max_tokens up to the model’s output cap: 16,384 to 131,072, depending on the model. Larger values are lowered to the cap, not rejected. If omitted: 8,192 to 32,768.
- Input tokens
- 1,000,000 uncached tokens per rolling minute. Cache hits don’t count.
- Requests
- 60 per minute.
- Concurrency
- 2 requests at a time.
- Request body
- Up to 8 MiB. n must be 1.
Errors
- HTTP 429
- Over a rate, token or concurrency limit. Wait for
Retry-Afterseconds. - HTTP 400
- The request cannot fit the model’s context window, or a parameter is not supported.
- Lowered output cap
- A
max_tokensabove the cap is lowered, not rejected. The real cap is in theX-6bee-Output-Capresponse header. On/v1/messagesa thinking budget is lowered with it.
On /v1/messages, errors come back in Anthropic’s format, so Anthropic clients handle them as usual.
What is not supported
“Compatible” means the request format is broadly the same, not that every feature of other APIs exists:
store,previous_response_idand WebSocket mode on the Responses endpoint.nother than 1.- Parameters a particular model does not implement. Behaviour differs between models.
Billing
Your balance is charged per token at each model’s price. Each request first reserves its input plus max_tokens of output; when it finishes you pay for what was used, and the rest goes back to your balance.
Per-token prices for each model are in the console.