Skip to main content
Three directions, three routes. Transcription takes a recording — a stored file or a public URL — and answers a transcript with per-segment timestamps. Speech takes up to 4 096 characters of text and answers an audio file, already saved to Files so the same fil_ can be downloaded, published or handed to an agent. Conversation takes a stored recording of one spoken turn and answers the spoken reply, saved the same way — one model listens and speaks, with no transcript or text model in between. Alongside the three, Sound effects turns a text prompt into a short generated clip — ambience, foley, a sting — and Music turns one into an original song, both saved the same way. All of them bill on the media component, what the finished call actually cost, exactly like image generation. Inside a session, transcription, speech, sound effects and music are the transcribe_audio, generate_speech, generate_sound_effect and generate_music tools; there is no conversation tool.

Managed aliases and pinned models

Every route takes an optional model. Omit it and the request runs on the direction’s default — the first row of its catalogue (see the default speech model). Name the managed alias for a direction — stt/auto, tts/auto, s2s/auto — to let the platform pick the model for each request, the one voice mode uses; it falls back automatically when one is unavailable. Name a pinned owner/model from the catalogue to run on exactly that model instead; a pinned model that is unavailable fails rather than falling back. The reply’s model names the model that actually ran. Transcription and speech run in a data-residency floor by default: recordings and text are processed in the United States or on globally-hosted endpoints, never in a region-restricted deployment. Speech-to-speech models are hosted by their own maker, so a conversation has no such floor — the reply comes from wherever the model you chose runs.

The transcription job

A transcription is a media_job of kind: "transcription". Most recordings are transcribed inside the request, so the job comes back completed on the 202 itself. A long recording may be queued upstream: the job then comes back processing, with the same shape, and the platform keeps collecting it in the background — re-read it with GET /v1/media/audio/transcriptions/{id} until it is completed or failed. cost_micro_usd is null until the transcript lands; the debit is booked once, when it does. The audio routes emit no media.job.* events.
string
med_…
string
Always media_job.
string
Always transcription.
string
queued · processing · completed · failed.
string
The transcription model or alias that ran.
object
What you sent, minus model.
object | null
Set once completed:
object | null
{ code, message } when failed.
integer | null
What was booked, in micro-USD; null until the job completes.
string
RFC 3339.
string | null
RFC 3339.

Transcribe

POST /v1/media/audio/transcriptions — scope agents:write, Idempotency-Key required
string
A stored audio file, fil_…. Exactly one of file_id or url.
string
A public http(s) URL of an audio file, at most 100 MiB. Exactly one of file_id or url. The same limits as a file import: loopback, private-network, link-local and cloud-metadata hosts are refused, every redirect is checked the same way, and a larger declared or actual body is validation_failed on url.
string
A model from GET /v1/media/models?kind=stt, or stt/auto. Omitted, the first row of that catalogue (google/gemini-2.5-flash-lite), which returns the text only: no segments, language or duration.
string
ISO 639-1 hint, for example en. Omitted, the model detects it.
boolean
default:"true"
Return per-segment timestamps.

Retrieve a transcription

GET /v1/media/audio/transcriptions/{id} — scope agents:read The same object, by id. A med_ from another organization, or one that is not a transcription, is 404 not_found.

Speak

POST /v1/media/audio/speech — scope agents:write, Idempotency-Key required Synchronous: the reply carries the stored file. Download the bytes with GET /v1/files/{id}?download=true.
string
required
What to say, 1–4 096 characters.
string
A model from GET /v1/media/models?kind=tts, or tts/auto. Omitted, the default model below.
string
One of the voices the model offers. Omitted, the model’s default. A voice the model does not have is validation_failed on voice.
string
default:"mp3"
mp3 · wav · ogg — a preference. The default model, and every pinned model in the catalogue, returns WAV (24 kHz mono) whatever is asked; the stored file’s content_type and extension say what you got.
number
0.5–2. Omitted, the model’s own pace.
The default speech model is the first row of GET /v1/media/models?kind=tts: openai/gpt-audio-mini, in the voice alloy. It also takes ash, ballad, coral, echo, sage, shimmer and verse. It answers WAV. Where that catalogue lists hexgrad/kokoro-82m first, it is the default instead: an open model we run on our own servers, at under 1 credit a second of audio (about 9 credits a minute). It speaks English only, in 28 voices: American af_alloy af_aoede af_bella af_heart (its default) af_jessica af_kore af_nicole af_nova af_river af_sarah af_sky am_adam am_echo am_eric am_fenrir am_liam am_michael am_onyx am_puck am_santa, and British bf_alice bf_emma bf_isabella bf_lily bm_daniel bm_fable bm_george bm_lewis; alloy, echo, fable, nova and onyx pick their namesakes. When you omit model, a request it cannot serve — another voice name, text in a non-Latin script or a sentence full of accented letters, a line that would take it more than about 90 seconds to speak (roughly 1 500 characters or more), or the model being busy or briefly unavailable — is spoken by the next model in the catalogue instead, and the reply’s model says which one spoke. Text in another language with few or no accented letters cannot be told apart from English, so name a multilingual model for it. Pin hexgrad/kokoro-82m to never switch: an unknown voice is then validation_failed and an outage provider_error. While it is not listed, hexgrad/kokoro-82m and its af_/am_/bf_/bm_ voices are refused.
On hexgrad/kokoro-82m, the cost is its seconds of audio at the rate above, rounded up to a whole micro-dollar. Another model’s cost is settled from the provider’s usage record after the audio is returned. When that record is not yet available, the call is billed at the media component’s floor rather than held.

Converse

POST /v1/media/audio/conversations — scope agents:write, Idempotency-Key required Synchronous, like speech: one spoken turn in, the spoken reply out, as a stored file. The input is a stored file only — upload or import a recording first; the CLI does both for you.
string
required
A stored audio file, fil_…, holding the turn to answer.
string
default:"s2s/auto"
string
One of the voices the model offers. Omitted, the model’s default.
string
default:"mp3"
mp3 · wav · ogg, a preference: the catalogue’s conversation models reply in WAV whatever is asked, and the file’s content_type says so.
The reply is a speech_generation, the same object Speak answers, with model naming the conversation model or alias that ran.

Sound effects

POST /v1/media/sound-effects — scope agents:write, Idempotency-Key required Synchronous, like speech: a text prompt in, a short generated clip out, saved to Files as a fil_. This is not speech — it turns a description ("a heavy wooden door slamming shut, echoing") into an effect — so it takes no voice and no model; the reply names none. Inside a session it is the generate_sound_effect tool.
string
required
What to generate, 1–500 characters.
number
How long the clip should be, 0.5–30. Omitted, the generator picks a length to fit the prompt.
boolean
default:"false"
Make the clip loop seamlessly — for ambience and backgrounds.
The cost is settled from the clip the generator returns — its length in seconds, never more than 30 — after the audio lands, billed once on the media component under the Idempotency-Key.

Music

POST /v1/media/music — scope agents:write, Idempotency-Key required Synchronous, like sound effects: a text prompt in, an original song out, saved to Files as a fil_. Describe the genre, mood, instrumentation and any lyrics ("an upbeat synthwave track with driving bass and bright arpeggios"); it takes no voice and no model, and the reply names none. Inside a session it is the generate_music tool.
string
required
What to generate, 1–2 000 characters.
number
How long the song should be, 3–300. Omitted, 30.
boolean
default:"false"
Force an instrumental track with no vocals.
The cost is settled from the song the generator returns — its length in seconds, never more than 300 — after the audio lands, billed once on the media component under the Idempotency-Key.

Voice tools

Five more speech calls, each synchronous and stored in Files like Speak. They use the stock voices only: voice must be an id from List voices, and a voice made by another workspace is never listed or accepted (400 validation_failed). Each call is held up front from the input’s length and billed what it cost on the media component, under its Idempotency-Key. Open to developer workspaces; the POSTs need a funded workspace. On a deployment with no speech provider bound, each answers 501 feature_not_configured. All four POSTs take scope agents:write (or tools:run on a developer key); List voices takes agents:read (or tools:read). A voice is { id, object: "voice", name, gender, accent, age, language, description, use_case } (each descriptive field may be null). Pass its id as voice here, or to Speak with model: "tts/auto".
The same calls run as tools (voice.change, voice.isolate, voice.align, voice.dialogue, voice.voices) through POST /v1/tools/runs. Voice cloning and dubbing are not offered.

The catalogues

GET /v1/media/models answers the audio models too: kind=stt, kind=tts and kind=s2s each list the managed alias for that direction first, then the pinned models cheapest-first where a published price exists. Each row’s description carries the published price per second or per request where there is one. Voices are the model’s own: a speech or conversation model accepts the voice names its maker publishes, and the managed aliases pick a voice when none is named.

Errors