Make your first call.
One Routers key. Every model available to that key.
1. Create your API key
Sign in with X, add credit and create one key in your workspace. The same key and balance work across all enabled model families. Keep the key on your server.
Open API keys ↗2. Choose any available model
OpenAI-compatible describes the request format. It does not limit you to OpenAI models. Use the same https://routers.markets/v1 base URL and Routers key for available GPT, Claude, Gemini, Grok, DeepSeek, Qwen and other models; change only the model value.
Call GET /v1/models with your API key to get the exact model IDs allowed for that key.
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}'How usage works
Before forwarding a request, we reserve its maximum estimated dollar cost and weighted base-token cost. After the provider returns usage, the difference is released. Keep max_completion_tokens close to what you need.
Incomplete streams or missing provider usage retain their reservation until reconciliation. This protects your balance from inaccurate billing.
| Response | Meaning |
|---|---|
| 401 | Missing, expired or revoked API key |
| 402 | Insufficient credit or per-key cap |
| 429 | Request, concurrency or daily capacity limit |
| 503 | Provider, inventory or configuration unavailable |