Skip to main content

Overview

OpenRouter is a model gateway: one API key and one bill across many providers, behind an OpenAI-compatible interface. Selecting the model assemblyai/universal-3-5-pro on its transcription endpoint routes the request to AssemblyAI’s Sync API. You send OpenAI-shaped fields; AssemblyAI’s own options travel in a provider.options.assemblyai block that OpenRouter forwards untouched.

Routing through OpenRouter, or calling us directly

Route through OpenRouter when you already buy inference through it and want transcription on the same key, bill, and client — or when you’re comparing speech models and want to swap providers by changing one string. Call the Sync API directly when you want the things a gateway can’t pass through: live upload, which streams audio while the person is still speaking so you only wait on the final stretch; connection pre-warming; data residency endpoint selection; and our SDKs.

OpenRouter STT docs

OpenRouter’s reference for the transcription endpoint.

Sync STT quickstart

Use the Sync API directly, without the gateway.

Quickstart

Set your OpenRouter key:
Then POST base64-encoded audio. This example transcribes a medical intake call with a prompt, keyterms, and the preceding turns of the conversation:
OpenRouter also accepts an OpenAI-style multipart/form-data upload with a file part, which makes the basic case a drop-in for the OpenAI SDK. AssemblyAI’s options are a nested object, so reach for the JSON body above whenever you need provider.options.

Parameter mapping

OpenAI-compatible fields sit at the top level of the request:
language is ignored when a custom prompt is set — state the language in your prompt if you need both (see Specifying the language).

AssemblyAI options

Everything specific to AssemblyAI goes under provider.options.assemblyai, keyed by our provider slug. Each maps to the config field of the same name on POST /v1/transcribe.
string
A natural-language description of what the audio is about — the domain, the scenario, the participants. Write it as a description of the audio, not as instructions to the model. Maximum 6000 characters. A managed default is applied when you omit it, so test without one first. See Contextual prompting.
string[]
Terms to bias the decoder toward — drug names, product names, proper nouns. Maximum 100 terms and 8000 characters across all of them. See Keyterms prompting.
string | string[]
Prior turns of the same conversation in chronological order, oldest first. Gives the model continuity across a multi-turn exchange. Maximum 500 turns and 16000 characters; context over either cap is trimmed rather than rejected, oldest turns first. See Conversation context.

Response

The default response_format is jsontext plus a usage block, nothing else. verbose_json adds task, duration, confidence, and segments; words arrives on top of those when you also pass timestamp_granularities: ["word"].
A few things to expect from that payload:
  • words needs both flags. timestamp_granularities: ["word"] on its own does nothing — with response_format: "json" you get back text and usage and no more.
  • There is no language field, even when you send language on the request.
  • usage is OpenRouter’s accounting, not ours. These requests bill through your OpenRouter account, and cost is in US dollars.

Limits

  • Audio duration80 ms to 120 s. This is the Sync API’s limit; OpenRouter adds none of its own.
  • Processing timeout — 60 s at the gateway.
  • Request size — 25 MB for a multipart upload. Duration binds long before size does: 120 seconds of 16 kHz mono WAV is under 4 MB, roughly 5 MB once base64-encoded.

Audio

Send 16-bit WAV, mono or stereo, at 8000, 16000, 22050, 24000, 32000, 44100, or 48000 Hz. Full constraints are in Audio requirements. wav is the only value of input_audio.format this model accepts. The other containers OpenRouter’s endpoint supports across its catalog — mp3, flac, m4a, and the rest — are rejected at the gateway before reaching us:
Transcode to WAV before sending.

Sync STT quickstart

Call the Sync API directly, with live upload.

Prompting and keyterms

Write prompts and keyterm lists that improve accuracy.

Conversation context

Carry prior turns into each request.

Audio requirements

Duration, size, format, and sample-rate constraints.