Documentation

Ship your first call in a couple of minutes.

OxaRouter exposes one OpenAI-compatible endpoint for 100+ models, routed to the fastest healthy provider. Availability, billing currency, rates and top-up options depend on the live gateway configuration.

Quickstart

Three steps to your first response

Start with the free models, then move to production keys.

Step 01

Create a key

Mint an API key in the console. Every key carries its own spend limit and usage meter.

Step 02

Point your SDK at us

Any OpenAI-compatible client works. Change the base URL and pass your key as a bearer token.

Step 03

Send a request

Pick a model id and call it. Routing, retries and billing all happen behind the endpoint.

first_call.shbash
curl https://oxarouter.com/gateway/v1/chat/completions \ -H "Authorization: Bearer sk_live_..." \ -H "Content-Type: application/json" \ -d '{ "model": "openai/gpt-4o-mini", "messages": [{ "role": "user", "content": "Namaste" }] }'

Reference

Base URL, auth and endpoints

The gateway proxies OpenAI- and Anthropic-compatible HTTP routes to router.cheap, so existing clients and prompts port over as-is.

OpenAI base URLhttps://oxarouter.com/gateway/v1
Anthropic / Gemini base URLhttps://oxarouter.com/gateway
OpenAI authAuthorization: Bearer sk_live_...
Anthropic authx-api-key: sk_live_... and anthropic-version: 2023-06-01
Gemini authx-goog-api-key: sk_live_...
CurrencyConfirm the current billing currency and conversion with the live gateway; the public model table shows USD reference rates.
Rate limit60 requests per minute per key by default; ask us for more.
GET /v1/models, GET /v1/models/{model}List models available to your key or get one model.
POST /v1/chat/completions, POST /v1/responsesChat Completions and Responses APIs.
POST /v1/responses/compact, POST /v1/completionsResponses conversation compaction and legacy text completions.
POST /v1/embeddings, POST /v1/moderationsEmbeddings and moderation.
POST /v1/images/generations, POST /v1/images/editsImage generation and multipart image edits.
POST /v1/audio/speech, POST /v1/audio/transcriptions, POST /v1/audio/translationsSpeech generation, transcription and translation.
POST /v1/videos, GET /v1/videos/{id}, GET /v1/videos/{id}/content, POST /v1/videos/{id}/remixCreate, inspect, download or remix a video job.
GET /v1/realtime?model={model}Realtime WebSocket connections must use wss://router.cheap/v1/realtime directly.
Anthropic: POST /v1/messages, POST /v1/messages/count_tokens, GET /v1/modelsAnthropic Messages API, token estimates and Anthropic-format models. Send x-api-key and anthropic-version.
Gemini: GET /v1beta/models, GET /v1beta/models/{model}List Gemini-compatible models or get one model.
Gemini: POST /v1beta/models/{model}:generateContent, :streamGenerateContent, :embedContent, :batchEmbedContents, :countTokensGenerate content, stream with ?alt=sse, embed content or count tokens.
Gemini OpenAI-compatible: /v1beta/openai/...OpenAI-compatible models, chat, embeddings, images and videos; authenticate with a bearer token.

Errors

What the status codes mean

Errors return JSON with a code and a message, plus a Retry-After header where useful.

401 unauthorizedMissing or revoked key. Mint a new one in the console.
402 insufficient_balanceBalance is low. Use the top-up method currently enabled for your account.
429 rate_limitedToo many requests for this key. Retry after the Retry-After header.
503 no_routeEvery provider for that model is failing and the breaker is open. Retry shortly.