v

latestOpenAPI 3.1.02026-08-0814845.6 KB

Preview a route without upstream traffic

get/v1/routing/preview

Query parameters

stage'stt' | 'llm' | 'tts' required
languagestring
objective'latency' | 'quality' | 'cost' | 'balanced'
allowstring

Comma-separated providers or provider:model ids.

denystring

Comma-separated providers or provider:model ids.

max_pricenumber

Maximum published benchmark price for the selected stage: STT in USD per minute, LLM in USD per 1M tokens, or TTS in USD per 1M characters. Candidates without a published price are excluded when this constraint is set.

transport'buffered' | 'streaming'

Which transport to model when stage=stt. buffered, the default, previews POST /v1/transcribe and POST /v1/audio/transcriptions. streaming previews GET /v1/transcribe/stream, which walks its own dial order, keeps one model per provider, and applies its own verified-language set: a ru streaming preview reports Soniox where the buffered one reports OpenAI. A streaming preview only considers configured providers, so routable_only=false cannot widen it.

diarizeboolean

Label each word and segment with the speaker who said it; diarization is accepted as an alias. When no available provider can diarize on the transport in use the request is refused with 422 unsupported_feature rather than answered without speakers.

word_timestampsboolean

Ask for per-word start and end offsets. Words are already returned by every provider whose response carries them; this states the requirement, so it narrows the candidate set and can answer 422 unsupported_feature.

smart_formatboolean

Punctuation, casing and number formatting. Omit to keep the provider default, which on the streaming socket has always been smart formatting on. This option never narrows the candidate set.

detect_languageboolean

Let the provider identify the language instead of being told one. Providers that detect by being sent no language are asked by omission.

language_hintsstring
Example:en,es

Comma-separated candidate languages, at most eight, each a language this router is configured to serve. Only a provider whose contract accepts several languages can serve this, so it narrows the candidate set.

Headers

X-Speko-Provider-Optionsstring

Provider-specific settings to forward, as a JSON object keyed by provider name: {"deepgram":{"endpointing":1200},"smallest":{"max_words":24}}. At most 4096 bytes. Forwardable settings are deepgram: endpointing, punctuate; soniox: enable_endpoint_detection; smallest: endpointing, eou_timeout_ms, finalize_on_words, itn_normalize, max_words, numerals. Every other provider accepts an empty object and no settings. A document that cannot be read answers 400 invalid_provider_options; an unknown provider name, a setting outside that provider's list, or a setting the router owns -- model, language, encoding, sample_rate, credentials, and the transcription options above -- answers 400 invalid_parameter naming it. Values must be a boolean, a number, or a string of at most 256 characters. Precedence per setting is the provider default, then the API key's saved policy, then this header. SETTINGS FOR A PROVIDER THIS REQUEST DOES NOT REACH ARE IGNORED, not an error: the router ranks providers and fails over, so which one answers is not the caller's choice. Send settings for every provider you would accept and whichever answers reads its own.

Response

Routing decision