Build with every
supported model.
One OpenAI-compatible endpoint, one Routers key and one balance.
What Routers does
Exact model IDs always stay exact and are never silently swapped or downgraded. When you explicitly choose routers/auto, Routie may select a compatible verified model and returns the actual selected ID in the response and headers.
Base URL
Use this endpoint in any OpenAI-compatible client:
https://routers.markets/v1Authentication uses Authorization: Bearer YOUR_ROUTERS_KEY.
1. Create an account and API key
- Sign in with X to create your workspace.
- Eligible first-time X accounts receive 1,000,000 promotional base tokens for supported signup models.
- Open API keys, create a key and copy it immediately. Only its hash is stored, so the full key cannot be shown again.
- Keep keys on your server. Never expose one in browser code, a public repository, screenshots or client-side environment variables.
2. Choose a model
Call GET /v1/models with your key to receive its exact enabled model IDs. The same key can call available GPT, Claude, Gemini, Grok, DeepSeek, Qwen and other listed families. Change only the model value.
The Playground marks models compatible with promotional tokens and lists them first. Models marked as requiring paid credit need a purchased balance.
Routers Auto
Set model to routers/auto to let Routie select from the verified models available to your key. The optional routing_strategy value can be balanced, cheapest, fastest or best. You can also send the same value in X-Routers-Strategy.
Routers filters for tools, vision, JSON format, context size, key allowlists and usable balance before ranking. A fallback is attempted only after a provider rejects a candidate before output begins. The chosen model appears in the response model field and X-Routers-Model header. X-Routers-Fallbacks shows how many earlier candidates were safely skipped. Exact model IDs never use model-to-model fallback.
curl https://YOUR_DOMAIN/v1/chat/completions \
-H "Authorization: Bearer $ROUTERS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"YOUR_ENABLED_MODEL",
"messages":[{"role":"user","content":"Hello!"}],
"max_completion_tokens":256,"stream":true}'API endpoints
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /v1/models | List models available to the key |
| POST | /v1/chat/completions | Create chat completions or streams |
Native Anthropic Messages compatibility is not currently enabled. Use the OpenAI-compatible chat-completions endpoint for every model family.
Supported request features
- Standard role-based messages
- Streaming with server-sent events
- Tool calls on models marked Tools
- Vision on models marked Vision
- JSON response formats on verified models
- Temperature, top-p, stop and supported reasoning options
Model capabilities are shown in the model catalogue and are validated before a model is enabled.
Balances, tokens and billing
Your account tracks three different measurements:
| Balance | Meaning |
|---|---|
| Usage credit | Dollar-denominated prepaid credit charged at each model's displayed rates. |
| Base tokens | Supplier-capacity allowance. Each model consumes it using its displayed ratio. |
| Actual model tokens | The input, output, cached and reasoning tokens reported by the model provider. |
Before sending a request, Routers temporarily reserves its conservative maximum cost using your input and max_completion_tokens. When verified usage returns, the unused amount is released. Keep the maximum close to what your application actually needs.
Promotional tokens are separate from purchased balances, work only on models marked promotional and expire according to the offer. Purchased credit works across all enabled models available to your key.
Gift API credit
- Open Gift credit in your workspace and choose an X handle, email address or private claim link.
- Choose how many purchased base tokens to send. Routers also transfers the matching purchased usage credit, so both balance limits stay aligned.
- Existing X or verified-email accounts receive the gift immediately. Other gifts reserve the credit behind a cryptographically random, single-use claim link.
- Unclaimed gifts can be cancelled by the sender. After seven days they expire automatically and both balances return to the sender.
Signup rewards, holder rewards and all other promotional balances cannot be transferred. Gift links should be shared privately and API credit cannot be withdrawn or redeemed for cash.
$ROUTERS holder reward
- Sign in with X, then open Holder rewards.
- Hold at least 2,000,000 $ROUTERS for 12 continuous hours to qualify for 500,000 promotional API tokens. Hold at least 10,000,000 for the same period to qualify for 5,000,000.
- Verify the holding wallet by signing the one-time message. It is not an approval or transaction, spends no token and costs no gas.
- Routers reads the verified token contract on Robinhood Chain and reconstructs the continuous holding period from its Transfer history. A balance drop below the tier resets that tier's clock.
- Claim once per X account and once per wallet. The current reward expires after seven days and works on promotional models.
Contract: ↗
Wallet top-ups
Choose an amount and either connect a supported wallet or send the exact invoice amount directly. Pay with SOL on Solana or ETH on Ethereum or Robinhood. Routers issues twice the paid amount as usage credit after the server verifies the receiving address, exact amount, network and finality.
Network fees are separate. Keep the invoice ID and transaction hash until the credit appears. Never send funds to an address copied from anywhere except the active Routers invoice.
API-key controls
Each key can have an allowlist, expiration, requests-per-minute limit, lifetime token cap, dollar cap, daily cap and monthly cap. Rotate a key if it may have been exposed; revoke it when a project no longer needs access.
A rotated key replaces the old secret immediately. Update your server environment before making another request.
Streaming
Set stream: true to receive server-sent event frames. Read each data: frame until [DONE]. Routers requests usage data from the provider and reconciles the reservation when the stream completes.
If a connection ends before verified usage arrives, the reservation can remain pending for reconciliation. Check Usage before immediately retrying a timed-out request.
Privacy and security
- Prompt and response text are not stored by Routers.
- Billing metadata such as model, token counts, cost, status and latency is stored.
- Customer API keys are stored as hashes.
- Provider credentials are encrypted at rest.
- Request content is processed by the selected upstream provider under its policies.
Operational limits
Provider availability, per-key limits, account limits, model context windows, concurrency and shared daily platform capacity can all apply. The Dashboard and Usage pages show current balances and recorded consumption.
View platform status ↗Errors and troubleshooting
| Response | Meaning |
|---|---|
| 400 | Invalid request, parameter or context length |
| 401 | Missing, expired or revoked API key |
| 402 | Insufficient balance or an API-key spending limit |
| 403 | The selected model is outside the key allowlist |
| 404 | Model is unavailable or not verified |
| 429 | Request, concurrency or daily capacity limit |
| 503 | Provider, inventory or platform capacity unavailable |
- For a 401, reconnect the exact active key or rotate it.
- For a 402, lower
max_completion_tokens, choose a promotional-token-compatible model, review key caps or add credit. - For a 429, wait before retrying and use exponential backoff.
- For a 503, check platform status before retrying.
