v

latestOpenAPI 3.1.02026-08-0814845.6 KB

Transcribe raw audio with cross-provider routing

Query parameters beyond the ones documented here are forwarded to the selected provider where its contract reads them, as they always have been; the transcription options below are consumed by the router instead.

post/v1/transcribe

Query parameters

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-Objective'latency' | 'quality' | 'cost' | 'balanced'

Routing objective. Defaults to the route policy.

X-Speko-Languagestring

BCP 47 language tag used for benchmark selection and provider transcription.

X-Speko-Allowstring

Comma-separated providers or provider:model ids to allow.

X-Speko-Denystring

Comma-separated providers or provider:model ids to exclude.

X-Speko-Max-Pricenumber

Maximum published benchmark price for the request 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.

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

Normalized transcription

textstring required
languagestring

Language the provider reported for this audio, in the provider's own spelling. Present only for providers that report one.

durationnumber

Length of the audio in seconds, when the provider measured it.

confidencenumber

Provider confidence in the whole transcript, 0 to 1.

Example response

{
  "language": "en",
  "words": [
    {
      "speaker": "0"
    }
  ],
  "segments": [
    {
      "speaker": "0"
    }
  ]
}