Sign in
BUILT FOR BUILDERS

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.

Test a model in the Playground ↗
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.

ResponseMeaning
401Missing, expired or revoked API key
402Insufficient credit or per-key cap
429Request, concurrency or daily capacity limit
503Provider, inventory or configuration unavailable
Native Anthropic and Claude Agent SDK adapters are not yet verified. Use the OpenAI-compatible endpoint. SDK examples require live integration testing before production use.