On this page
Quick start
Anthropic-compatible clients use the root base URL. OpenAI-compatible clients use the /v1 base URL.
export ANTHROPIC_BASE_URL=https://nixo.codes
export ANTHROPIC_API_KEY=your-key-hereexport OPENAI_BASE_URL=https://nixo.codes/v1
export OPENAI_API_KEY=your-key-hereAuthentication
Send your key with every API request. Use the header that matches your client format.
curl https://nixo.codes/v1/messages \
-H "x-api-key: YOUR_KEY" \
-H "content-type: application/json" \
-d '{"model":"anthropic/opus-5-5","max_tokens":1024,"messages":[{"role":"user","content":"Hello"}]}'x-api-key: YOUR_KEY
Anthropic-style clients
Authorization: Bearer YOUR_KEY
OpenAI-style clients
Create and manage keys in your dashboard. Keep keys on the server and out of browser code.
POST /v1/messages
Anthropic Messages-compatible endpoint for Claude, Fable, and supported open model groups.
{
"model": "anthropic/opus-5-5",
"max_tokens": 1024,
"messages": [{ "role": "user", "content": "Explain recursion in one sentence." }],
"stream": false
}Set "stream": true to receive server-sent events (Claude Code always streams). Streaming is metered: the request is billed from the final usage in message_start and message_delta. stream must be a boolean. Use output_config.effort where the selected model supports it.
POST /v1/responses
OpenAI Responses-compatible endpoint for GPT and supported Fable models. This is the preferred endpoint for Codex CLI and Desktop.
{
"model": "openai/gpt-6-sol",
"instructions": "You are a helpful assistant.",
"input": "Explain recursion in one sentence.",
"stream": false,
"store": false
}- Streaming is supported and metered: with
"stream": truethe request is billed from the usage inresponse.completed. - Response storage is disabled.
- A default instruction is supplied when
instructionsis omitted.
POST /v1/chat/completions
OpenAI Chat Completions-compatible endpoint. Claude requests are translated to Anthropic Messages; other model families route to their matching provider pool.
{
"model": "anthropic/opus-5-5",
"messages": [
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": "Hello" }
],
"max_tokens": 1024,
"stream": false
}| Model ID | Routes to |
|---|---|
| anthropic/claude-* | Anthropic-compatible provider pool |
| anthropic/fable-5 | OpenAI provider pool |
| openai/gpt-6* | Matching GPT model pool |
| minimax/minimax-m3 | MiniMax provider pool |
With "stream": true Nixo always sets stream_options.include_usage, so the last chunk before [DONE] carries usage and the stream is billed from it.
See the model catalog for IDs and endpoint compatibility.
GET /v1/models
Returns the models available to your API key in an OpenAI-compatible list format.
curl https://nixo.codes/v1/models \
-H "Authorization: Bearer YOUR_KEY"For model capabilities and supported endpoints, visit Models.
Errors
Errors use a JSON object with an error field. Status and type depend on the failure.
| Status | Type | Meaning |
|---|---|---|
| 400 | invalid_request_error | Malformed request, missing model, or a non-boolean stream value |
| 400 | streaming_unsupported | stream: true was sent to an endpoint that does not stream (streaming works on messages, responses and chat completions) |
| 401 | authentication_error | Missing or invalid API key |
| 403 | plan_required / model_not_in_plan | Account plan or model access is not permitted |
| 404 | model_not_found | Model ID is not in the public catalog |
| 429 | insufficient_credits / pay_to_use_limit_reached | Available credits or configured Pay to Use limit is exhausted |
| 503 | credit_balance_unavailable | Billing or credit balance could not be checked |