Skip to content
Guides/Models and Routing

Model Routing

Choose explicit models, use task-specific automatic routes, and manage language routing policies.

Decide What Should Be Selected

Routing chooses an eligible model or provider for a request. Start with an exact model ID when you need to validate one integration. Introduce automatic selection after you have defined the capabilities and constraints your application requires.

All routing uses the same API URL and workspace. Language requests require llm.write; audio requests require audio.write. Use the model alias and request format for your endpoint.

Exact Models and Automatic Routes

TaskAutomatic Model IDWhere to Use It
TranscriptionautoTranscription endpoint
Speech generationtts/autoSpeech endpoint
Language generationcostream/autoChat Completions, Responses, or Messages

costream/auto is a retained API identifier. Use it exactly as written; audiolab/auto is not an equivalent alias.

An exact provider/model ID selects a concrete integration. Automatic routing chooses among eligible candidates. Neither choice grants access to disabled models or bypasses workspace limits.

Constrain the Route

Capabilities, input limits, provider restrictions, deployment availability, and routing settings constrain candidate selection. A fallback must satisfy the request’s requirements as well; it cannot silently remove a required capability.

For speech and transcription, the endpoint reference describes supported provider controls such as allowlists, order, sorting, and fallback behavior. Provider-native options can further restrict the route. A pinned transcription model does not fall back to another provider unless fallback is explicitly allowed.

Set hard requirements first, then express preferences such as cost or latency. Routing heuristics are selection policies, not guarantees of benchmark quality or end-to-end response time. Validate candidate outputs with representative inputs before relying on a route.

Manage a Named Language Router

A named router is a routing policy your workspace owns and calls like a model, router/<id>. Conditional routes match on request metadata, token counts or protocol; each route can split traffic between weighted A/B variants; each variant is an ordered or cheapest-first list of models.

  1. Create a router on the dashboard's Routers page and configure its routes.
  2. Test the rules. Simulation never calls a model, so it does not prove provider availability.
  3. Publish. Each publish creates an immutable revision and makes it live.
  4. Call it through Chat Completions, Responses or Messages with model: "router/<id>", and send router_revision to pin a revision.

Editing a router needs a dashboard session; calling it needs an API key with llm.write. Restoring an earlier revision creates a new one, so you can roll back without losing history. Follow Named Routers for examples, and the named-router reference for every field.

Inspect the Result

Test a small request and inspect its selected model, status, latency, and recorded usage. If there is no eligible route, check constraints and model availability before loosening the policy.

Fallback can occur only where the protocol supports it. Once output has been delivered, a client cannot safely treat a different model’s restarted output as the same response. See Streaming and Errors and Debugging for partial output handling.

Route Language Requests

Chat Completions, Responses and Messages route alike, streamed or not:

Model FieldWhat Answers
A model IDThat model, on any host that serves it; models adds fallbacks, tried in order
A host’s own ID, such as groq/gpt-oss-120bThat model on that host only
~author/family-latestThe newest model of that family (Latest Aliases)
costream/autoThe model a classifier picks for the prompt
costream/fusionA panel of models, compared by a judge
router/<id>Your named router’s published revision

A fallback runs only when the endpoint before it fails before any output. Every candidate must support the request’s tools, response format, reasoning settings, images, PDFs and web search; one that cannot is skipped, and the request is refused only when none can.

A sampling parameter such as temperature, top_p, seed or stop is dropped for a model that does not support it, as on OpenRouter, and named in the x-audiolab-dropped-params header. A named router drops a temperature or top_p it does not list under Request Overrides the same way. Send "provider": {"require_parameters": true} to refuse the request instead.

Without max_tokens, a model may write up to its output cap, listed as top_provider.max_completion_tokens in List Models.

Models with Several Hosts

Some models are served by several hosts, such as openai/gpt-oss-120b on DeepInfra, Together AI and Groq. The model has one ID; each host is an endpoint with its own price, context, output cap, parameters, quantization and data policy. List Endpoints shows them, with each host’s uptime, latency and throughput over the last 30 minutes.

Without sort or order, endpoints are tried in this order:

  1. The model maker’s own endpoint, when it is one of the hosts and is healthy, such as Z.AI for z-ai/glm-5.2.
  2. The other healthy endpoints, in a random order weighted by the inverse square of their price (input price plus three times output price), so cheaper hosts take most requests.
  3. Degraded endpoints: a quarter or more of at least four recent requests failed through the host.

After five failures in a row through a host, its circuit opens: the host is tried after every other candidate for 30 seconds, longer if it keeps failing (doubling every five more failures, up to five minutes). Then one request tests it, and a success closes the circuit. An endpoint is never removed for its health, so a request is not refused because every host is failing. Health is measured from AudioLab’s own traffic: refused connections, timeouts, interrupted streams, empty answers and HTTP errors other than request errors count against a host.

A routed request holds credit for its most expensive endpoint and is charged only for the endpoint that answered, at that endpoint’s price. A host that fails costs nothing. When your filters leave one endpoint of a single requested model, the request runs on it directly. A request uses at most eight endpoints, always including each requested model’s best one.

A conversation answered by a host that discounts cached input prefers that host for ten minutes after its last answer, so the cache can be read, unless the host is degraded or its circuit is open, or the request sets sort, order or a ranking suffix. A conversation is your session_id, or else its system prompt and first message.

Provider Preferences

The provider object takes OpenRouter’s fields on Chat Completions, Responses and Messages:

FieldEffect
only, ignoreUse only, or never, these providers or endpoint tags, such as deepinfra or deepinfra/turbo
orderTry these first, across every requested model. With allow_fallbacks: false, nothing else
allow_fallbacksfalse uses the first endpoint only
sortprice, throughput (p50 output tokens per second), latency (p50 time to first token) or exacto. As {"by": ..., "partition": "none"}, every requested model’s endpoints are ranked together instead of one model at a time
quantizationsOnly hosts that publish one of these; unknown matches hosts that do not say
max_priceprompt and completion in USD per million tokens. No language model charges per request or image
preferred_min_throughput, preferred_max_latencyEndpoints measured below this throughput (tokens per second) or above this latency (seconds to first token) are tried after the rest. A number is the p50; an object sets p50, p75, p90 or p99
require_parametersRefuse the request instead of dropping parameters an endpoint does not support
zdr, data_collectionOnly endpoints with reviewed zero retention, or that do not train on or publish prompts. They can only narrow your workspace’s privacy settings
data_regionOnly endpoints documented as processing in this region (Regions)
enforce_distillable_text, optionsAccepted but not honoured, and named in x-audiolab-ignored-provider-fields

Throughput and latency are measured over the last 30 minutes of AudioLab traffic. Endpoints without measurements are ranked after measured ones, cheapest first, and count as meeting a preferred minimum or maximum.

Regions

Set provider.data_region to route only to endpoints whose provider documents processing in that region: us, eu or a country code from the table below. A list allows any of its regions, and eu includes its member states. An endpoint marked global (several regions, none fixed) or unknown (not documented) never matches. Fallbacks keep to the region.

The field works on Chat Completions, Responses, Messages and every other product, and on a stream’s session.start frame. Speech and transcription also accept its older name, provider.region.

A workspace’s Data Region setting either requires a region for every request (Only) or tries its endpoints first (Prefer). A named router can require regions too. Each requirement adds to the others, so a request can narrow its workspace and router but never widen them. When no endpoint qualifies, the request is refused before any provider is called:

400
{"error":{"code":"data_region_unavailable","type":"invalid_request_error","message":"No endpoint for anthropic/claude-sonnet-5 processes requests in the EU (eu). Remove provider.data_region to route without the request's region requirement.","param":"provider.data_region","metadata":{"data_region":["eu"]}}}

The table lists the hosts AudioLab calls; a regional host it does not use is not counted. List Endpoints returns the same region for each endpoint.

ProviderEndpointsRegionLocationSource
Alibaba Cloud Model StudioCosyVoice v3.5cnChina (Beijing)www.alibabacloud.com, 2026-10-15
Alibaba Cloud Model StudioOther modelsglobalSingapore account; inference on international nodes outside mainland Chinawww.alibabacloud.com, 2026-10-15
Amazon Web ServicesPolly speechusAWS us-east-1aws.amazon.com, 2026-10-15
Amazon Web ServicesTranscribeusAWS us-east-1aws.amazon.com, 2026-10-15
Amazon Web ServicesNova SonicusAWS us-east-1 (in-Region model ID)docs.aws.amazon.com, 2026-10-15
AnthropicAllglobalAny available geography (no inference_geo sent)platform.claude.com, 2026-10-15
AssemblyAISync transcriptionglobalNearest US or EU regionassemblyai.com, 2026-10-15
AssemblyAIStreaming transcriptionglobalNearest US or EU regionwww.assemblyai.com, 2026-10-15
AssemblyAIPre-recorded transcriptionusUnited States (AWS us-west-2)www.assemblyai.com, 2026-10-15
CartesiaAllglobalRouted to the closest deploymentdocs.cartesia.ai, 2026-10-15
DeepgramAllunknownNot documented for the default endpointdevelopers.deepgram.com, 2026-10-15
DeepInfraAllusUnited Statesdeepinfra.com, 2026-10-15
DeepSeekAllcnChinacdn.deepseek.com, 2026-10-15
ElevenLabsSpeechglobalNearest of the US, Netherlands and Singaporeelevenlabs.io, 2026-10-15
ElevenLabsOther endpointsunknownNot documented outside text to speechelevenlabs.io, 2026-10-15
falAllglobalThe US and other countriesfal.ai, 2026-10-15
GladiaAllglobalFrance by default; no committed region, US subprocessors for add-onswww.gladia.io, 2026-10-15
Google CloudChirp 2 transcriptionusGoogle Cloud us-central1docs.cloud.google.com, 2026-10-15
Google CloudOther transcriptionusGoogle Cloud US multi-regioncloud.google.com, 2026-10-15
Google CloudSpeechglobalGlobal endpoint, no regional isolationdocs.cloud.google.com, 2026-10-15
Google GeminiGemini APIglobalAny country with Google facilitiesbusiness.safety.google, 2026-10-15
GroqAllglobalData centers in the US, Canada, Europe, Australia and Saudi Arabiaconsole.groq.com, 2026-10-15
Hume AIAllglobalAny country with Hume or its providers' facilitieswww.hume.ai, 2026-10-15
Inworld AIRealtime speech to speechunknownLanguage model leg not documenteddocs.inworld.ai, 2026-10-15
Inworld AISpeechusUnited Statesdocs.inworld.ai, 2026-10-15
Microsoft AzureMAI-VoiceglobalRouted across 14 Azure regionslearn.microsoft.com, 2026-10-15
Microsoft AzureMAI-TranscribeunknownNot documented for MAI modelslearn.microsoft.com, 2026-10-15
Microsoft AzureOther speech and transcriptionusAzure East US (the Speech resource's region)learn.microsoft.com, 2026-10-15
MiniMaxAllunknownStorage in the US; processing not documentedplatform.minimax.io, 2026-10-15
Mistral AIAllglobalNo committed inference location on the global endpointdocs.mistral.ai, 2026-10-15
Moonshot AIAllsgSingaporeplatform.kimi.ai, 2026-10-15
Murf AIFalconglobalRouted to a nearby Falcon regionmurf.ai, 2026-10-15
Murf AIGen2usAWS us-east-2 (Ohio)murf.ai, 2026-10-15
OpenAIAllglobalNo fixed region for a project without data residencydevelopers.openai.com, 2026-10-15
Reson8Alleu, nlNetherlandsreson8.dev, 2026-10-15
Sarvam AIAllinIndiawww.sarvam.ai, 2026-10-15
Smallest.aiAllglobalNearest of India and the USdocs.smallest.ai, 2026-10-15
SonioxAllusUnited Statessoniox.com, 2026-10-15
SpeechmaticsBatch transcriptionunknownNot documented for the unpinned batch hostdocs.speechmatics.com, 2026-10-15
SpeechmaticsStreaming transcriptioneuEU1 (Europe)docs.speechmatics.com, 2026-10-15
Together AIAllglobalServerless routing; region not selectabledocs.together.ai, 2026-10-15
xAIAllglobalRouted between regions; not guaranteed on the global endpointdocs.x.ai, 2026-10-15
Z.AIAllsgSingaporedocs.z.ai, 2026-10-15

Model Variants

Add a suffix to a model ID, such as openai/gpt-oss-120b:nitro. Suffixes combine; of :nitro, :floor and :exacto, the last one wins, and it wins over provider.sort.

SuffixEffect
:nitroRank endpoints by throughput
:floorRank endpoints by price
:exactoRank endpoints by tool-call validity: first those with at least 20 tool calls in the last day and at most 5% invalid, then those without 20 calls, each by throughput, then the rest
:freeKeep free endpoints only; refused with 404 when there are none
:thinkingKeep endpoints that reason: those that reason by default, or every endpoint when the request sets reasoning. Refused when the request turns reasoning off
:onlineTurn on the model’s own web search; endpoints without it are skipped

A tool call counts as valid when it names a tool the request declared and its arguments are a JSON object that matches the tool’s schema types, required properties, enums and additionalProperties: false. No model that several hosts serve accepts tools yet, so until one does, :exacto ranks their hosts by throughput. An unknown suffix is refused with 400 and metadata.variant naming it.

Latest Aliases

A ~author/family-latest ID selects the newest model of that family on offer, by release date, so requests move to a new release without a code change. For example, ~z-ai/glm-latest, ~anthropic/claude-sonnet-latest, ~openai/gpt-mini-latest and ~google/gemini-flash-latest. The response’s model field and the routing explanation’s resolved field name the model it selected.

Families: Claude Opus, Sonnet, Haiku and Fable; GPT Sol, Luna, Terra, Astra, Mini and Nano; Gemini Pro, Flash and Flash-Lite; Grok; GLM; Kimi; DeepSeek Pro and Flash; Qwen Max, Plus and Flash; Mistral Large, Medium and Small.

Read the Routing Explanation

Every language response explains its route in the x-audiolab-routing header, as JSON, and in the body’s routing field. A stream carries the field on its final chunk (Chat Completions), response.completed event (Responses) or message_delta event (Messages). Browsers can read these headers across origins.

x-audiolab-routing
{"mode":"named","requested":"router/support","router":"router/support","revision":3,"route":"long-context","variant":"b","candidates":["openai/gpt-5.5","google/gemini-3.5-flash"],"model":"google/gemini-3.5-flash","provider":"google","attempts":[{"model":"openai/gpt-5.5","provider":"openai","role":"output","status":"failed","code":"provider_unavailable","upstream_status":503,"cause":"http_error"},{"model":"google/gemini-3.5-flash","provider":"google","role":"output","status":"succeeded"}]}
FieldMeaning
modedirect, fallback, auto, fusion or named
resolved, variantsThe model ID the request selected, without suffixes or as an alias’s target, and the suffixes that applied
sort, stickyHow endpoints were ranked (default, order, price, throughput, latency or exacto), and whether a conversation’s cached endpoint went first
router, revision, route, variantNamed routers: the revision, route and A/B variant that applied
model, provider, endpointWhat answered; endpoint is the host’s own ID when model is a model several hosts serve
attemptsEach provider call in order, with its role, status and failure code
classifiercostream/auto: the topic and difficulty it read
pluginsWhat each plugin did: the PDF engine and pages read, web search, JSON repair, messages removed by compression
data_regionThe regions required by the request, workspace and router, the preferred region, and the region of the endpoint that served it (Regions)

The explanation holds identifiers and codes, never prompt or output text. When the header would pass 2,000 bytes it leaves out the earliest attempts and counts them in attempts_omitted; the body keeps them all.