Skip to content
AZRouter.dev

Get started

Models

Address a model by its slug and list the models your key can call.

A model is addressed by its slug, provider/model, for example qwen/qwen3.8-flash. Only models on sale can be called. Prices, context length and modalities are on each model's page in the catalog.

List models

GET /v1/models returns the slugs your key can call, in OpenAI's list format.

Shell
curl https://api.azrouter.dev/v1/models \
  -H "Authorization: Bearer $AZROUTER_API_KEY"

Response (abridged):

JSON
{
  "data": [
    {"id": "z-ai/glm-5.3", "object": "model", "created": 1626777600},
    {"id": "qwen/qwen3.8-flash", "object": "model", "created": 1626777600},
    {"id": "openai/text-embedding-3-large", "object": "model", "created": 1626777600}
  ],
  "object": "list"
}

Each entry also carries owned_by and supported_endpoint_types; don't rely on them to pick a route. Use the endpoint table instead.

Which route a model uses

ModalityRoute
Text/v1/chat/completions, /v1/responses or /v1/messages
Embedding/v1/embeddings
Speech/v1/audio/speech

Embeddings

Shell
curl https://api.azrouter.dev/v1/embeddings \
  -H "Authorization: Bearer $AZROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "openai/text-embedding-3-large", "input": "The quick brown fox"}'

The response holds one vector per input in data[].embedding; this model returns 3,072 numbers.

Speech

Shell
curl https://api.azrouter.dev/v1/audio/speech \
  -H "Authorization: Bearer $AZROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "elevenlabs/eleven-v3", "input": "Your parcel is out for delivery.", "voice": "21m00Tcm4TlvDq8ikWAM", "response_format": "mp3"}' \
  --output speech.mp3

The body is the audio file itself, not JSON.

  • voice is required and must be an ElevenLabs voice ID. OpenAI voice names such as alloy are refused with 400 "Unknown voice".
  • Ask for "response_format": "mp3". Without it the bytes that come back are not an MP3 file.

Reasoning models

Some text models reason before they answer. The reasoning is billed as output tokens and counted in usage.completion_tokens_details.reasoning_tokens. If max_tokens runs out while the model is still reasoning, the reply has content: null and finish_reason: "length":

JSON
{
  "finish_reason": "length",
  "message": {"role": "assistant", "content": null, "reasoning": "We need to respond to user: \"Say hello in 3 words.\" Simple"},
  "usage": {"prompt_tokens": 68, "completion_tokens": 16, "completion_tokens_details": {"reasoning_tokens": 16}}
}

Raise max_tokens and send the request again.