Skip to content
NixoNixo

Nixo developer docs / API reference

API Reference

Use your Nixo API key with Anthropic-compatible and OpenAI-compatible request formats. Claude traffic uses Messages; GPT traffic supports Responses or Chat Completions.

Quick start

Anthropic-compatible clients use the root base URL. OpenAI-compatible clients use the /v1 base URL.

Anthropic-compatible
export ANTHROPIC_BASE_URL=https://nixo.codes
export ANTHROPIC_API_KEY=your-key-here
OpenAI-compatible
export OPENAI_BASE_URL=https://nixo.codes/v1
export OPENAI_API_KEY=your-key-here

Authentication

Send your key with every API request. Use the header that matches your client format.

curl
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.

request · application/json
{
  "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.

request · application/json
{
  "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": true the request is billed from the usage in response.completed.
  • Response storage is disabled.
  • A default instruction is supplied when instructions is 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.

request · application/json
{
  "model": "anthropic/opus-5-5",
  "messages": [
    { "role": "system", "content": "You are a helpful assistant." },
    { "role": "user", "content": "Hello" }
  ],
  "max_tokens": 1024,
  "stream": false
}
Model IDRoutes to
anthropic/claude-*Anthropic-compatible provider pool
anthropic/fable-5OpenAI provider pool
openai/gpt-6*Matching GPT model pool
minimax/minimax-m3MiniMax 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
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.

StatusTypeMeaning
400invalid_request_errorMalformed request, missing model, or a non-boolean stream value
400streaming_unsupportedstream: true was sent to an endpoint that does not stream (streaming works on messages, responses and chat completions)
401authentication_errorMissing or invalid API key
403plan_required / model_not_in_planAccount plan or model access is not permitted
404model_not_foundModel ID is not in the public catalog
429insufficient_credits / pay_to_use_limit_reachedAvailable credits or configured Pay to Use limit is exhausted
503credit_balance_unavailableBilling or credit balance could not be checked

Ready to configure a client? Continue to setup and install →