Skip to main content

API Reference

Use your OpenLimits API key with Anthropic-compatible and OpenAI-compatible request shapes. Claude traffic uses Messages, GPT traffic uses Responses or Chat Completions, and model lists use the OpenAI-compatible format.

Quick Start

Anthropic-compatible clients use the root base URL:

export ANTHROPIC_BASE_URL=https://openlimits.app
export ANTHROPIC_API_KEY=your-key-here

OpenAI-compatible clients use the /v1 base URL:

export OPENAI_BASE_URL=https://openlimits.app/v1
export OPENAI_API_KEY=your-key-here

Authentication

All API requests require one of these headers:

  • x-api-key: YOUR_KEY for Anthropic-style clients
  • Authorization: Bearer YOUR_KEY for OpenAI-style clients
curl https://openlimits.app/v1/messages \
  -H "x-api-key: YOUR_KEY" \
  -H "content-type: application/json" \
  -d '{"model":"anthropic/claude-opus-4.8","max_tokens":1024,"messages":[{"role":"user","content":"Hello"}]}'

POST /v1/messages

Anthropic-compatible endpoint for Claude, Fable, and open model-group requests.

POST /v1/messages
Content-Type: application/json
x-api-key: YOUR_KEY

{
  "model": "anthropic/claude-opus-4.8",
  "max_tokens": 1024,
  "messages": [
    { "role": "user", "content": "Explain recursion in one sentence." }
  ],
  "stream": false
}
{
  "id": "msg_...",
  "type": "message",
  "role": "assistant",
  "content": [
    { "type": "text", "text": "Recursion is when a function calls itself..." }
  ],
  "model": "anthropic/claude-opus-4.8",
  "usage": {
    "input_tokens": 14,
    "output_tokens": 32
  }
}

Set stream to true for Anthropic-compatible SSE streaming. Effort can be supplied through output_config.effort where supported.

POST /v1/responses

OpenAI Responses-compatible endpoint for GPT and Fable models. This is the preferred endpoint for Codex CLI/Desktop.

POST /v1/responses
Content-Type: application/json
Authorization: Bearer YOUR_KEY

{
  "model": "openai/gpt-5.6-sol",
  "instructions": "You are a helpful assistant.",
  "input": "Explain recursion in one sentence.",
  "stream": true,
  "store": false
}
  • stream is forced to true
  • store is forced to false
  • If instructions is omitted, a default instruction is supplied

POST /v1/chat/completions

OpenAI-compatible endpoint for OpenAI SDK clients. Claude requests are translated to Anthropic Messages; OpenAI-family requests route through OpenAI providers.

POST /v1/chat/completions
Content-Type: application/json
Authorization: Bearer YOUR_KEY

{
  "model": "anthropic/claude-opus-4.8",
  "messages": [
    { "role": "system", "content": "You are a helpful assistant." },
    { "role": "user", "content": "Hello" }
  ],
  "max_tokens": 1024,
  "stream": false
}
ModelRoutes to
anthropic/claude-*Anthropic-compatible provider pool
anthropic/fable-5OpenAI provider pool as upstream gpt-5.5
openai/gpt-5.6-*OpenAI provider pool as the matching upstream GPT-5.6 model
minimax/minimax-m3MiniMax provider pool

GET /v1/models

Returns available models in OpenAI-compatible list format. See Models for the complete table.

GET /v1/models
x-api-key: YOUR_KEY

Errors

Anthropic-style endpoints return Anthropic-style errors; OpenAI-style endpoints return OpenAI-style errors where appropriate.

StatusTypeMeaning
400invalid_request_errorInvalid model or malformed request
401authentication_errorMissing or invalid API key
403permission_errorSpend limit exceeded, token expired, or model not allowed
429rate_limit_errorAll matching providers are temporarily at capacity

Ready to integrate?

Get a key and send requests.

Get Started ->