Get started
Quickstart
Make your first AZRouter request in curl, Python or TypeScript.
If your code already calls OpenAI or Anthropic, the switch is two values: the base URL and the key.
1. Add credits and create a key
New accounts start on the Free tier, whose monthly cap is $0.
Add credits in Dashboard → Credits first, then create a key in Dashboard → API keys.
The key is shown once; copy it and export it so the examples below can read it.


export AZROUTER_API_KEY="sk-..."2. Pick a base URL
Base URL: https://api.azrouter.dev/v1
Use it for the OpenAI SDKs and any tool with an "OpenAI-compatible" or "OpenAI base URL" setting. The client adds /chat/completions, /responses, /embeddings and so on.
export OPENAI_BASE_URL="https://api.azrouter.dev/v1"
export OPENAI_API_KEY="$AZROUTER_API_KEY"3. Send a request
The examples use qwen/, a low-cost text model.
Any slug from the model list works the same way.
curl https://api.azrouter.dev/v1/chat/completions \
-H "Authorization: Bearer $AZROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen/qwen3.8-flash",
"messages": [{"role": "user", "content": "Reply with exactly: Hello from AZRouter"}],
"max_tokens": 200
}'The reply text is in choices[0].message.content:
Hello from AZRouterLeave room for reasoning
Some models, qwen/ among them, think before they answer and bill those reasoning tokens as output.
With a very small max_tokens the limit can run out during the thinking, and content comes back null with finish_reason: "length".
Keep max_tokens at a few hundred for short answers.
Next steps
Run Claude Code on AZRouter with your AZRouter key, on any paid usage tier.
Run OpenAI's Codex CLI on AZRouter models through the Responses endpoint.
Use AZRouter models in Cursor through the OpenAI base URL override.
Use AZRouter in Cline through its OpenAI Compatible provider.
POST /v1/chat/completions takes OpenAI's request body and returns OpenAI's response shape.
POST /v1/messages speaks Anthropic's Messages format for every text model on sale.
Server-sent events in OpenAI's chunk format, with usage in the last chunk.
Prepaid credits, how a call is priced, and the ±$0.000001 rounding rule.

