- Text to speech:
POST /v3/audio/speechturns text into spoken audio. - Speech to text:
POST /v3/audio/transcriptionsturns audio into a transcript. - Music and sound effects:
POST /v3/audio/generationsturns a prompt into a score, a song, a sound effect or a loop of ambience. See Music and sound effects.
model selects the provider, a small set of fields is normalized for you, and anything model-specific goes in parameters. You can also clone a custom voice from a short sample and reuse it. For live, two-way voice conversations, use Realtime instead.
Text to speech
Pass amodel and the input text. The response carries the audio inline as base64. Add "store": true to also keep a copy in Files and get a file_id + presigned url.
Response
Speech is billed per input character.
Finding voices
GET /v3/audio/voices?model=<model> lists every voice a text-to-speech model accepts as voice: the provider’s built-in voices (type: preset) first, then your project’s cloned voices on the same provider (type: custom). Pass the id of any entry as voice.
For ElevenLabs and Mistral, the built-in voices are read from the provider itself, so a voice they add shows up without any change on our side. Each comes with a name, gender, accent and languages, and ElevenLabs voices carry a preview_url you can listen to before you pick. For other providers, the list is the voices the model declares. meta.presets_source says which one you got (provider or catalog).
The entry marked
"default": true is the voice used when you leave voice out.
Voices for a specific language
Filter by language to find voices made for it. This lists every French (Canada) voice on Azure, and works the same for any locale such asde-AT, sv-SE or ja-JP:
Expressiveness
A voice can sound flat by default. How you add expression depends on the provider:- ElevenLabs exposes voice controls through
parameters.voice_settings: lowerstabilityfor a more dynamic, emotional read, higherstyleto exaggerate delivery, anduse_speaker_boost. Theelevenlabs/eleven_v3model also understands inline audio tags in theinputtext —[excited],[whispers],[sarcastic],[laughs]— for fine-grained emotion. - Mistral Voxtral has no style knobs; it mirrors the delivery of the voice it speaks as. For a lively result, use — or clone — a lively-sounding voice.
Audio tags count toward billed input characters, and
eleven_v3 bills at a higher rate — great for a hero voice, more than you need for bulk narration. Use GET /v3/audio/models to discover the exact parameters a model accepts (its params.tts.parameters list).Custom voices (cloning)
Clone a voice from a short reference sample and reuse it by an opaque id.POST /v3/audio/voices takes a model (which selects the provider to clone on), an audio reference — a file_id, https URL, or base64 data-URI of a few seconds of speech — and an optional name, languages, and gender. It returns a voice_... id you pass as voice on /v3/audio/speech, exactly like a built-in voice.
Response (create)
A clone carries the voice, not a language. Cloning captures timbre and accent; the output language comes from the text you synthesize with a multilingual model — so one clone can speak any supported language. Recording in the target language gives the most native accent.
- Provider binding. A voice is bound to the provider you cloned it on and only works with that provider’s TTS models. Using it with another provider’s model returns a
400. - Isolation & privacy. Voices are scoped to your project — never visible to or usable by another project — and the reference sample is not stored.
- Expiry. Some providers remove clones after a while. When they do,
expires_atis returned. Treat it as the provider’s estimate, not a deadline: it is the earliest date the provider may remove the voice, and a voice often keeps working well past it. A voice stays in your list for as long as the provider still has it. Once the provider has removed it, it drops out of the list and a speak returns a clear “no longer available” error. Create a new one from the same sample. Providers that don’t expire voices omitexpires_at. - Sample length. A few seconds is enough for Mistral Voxtral (zero-shot). ElevenLabs works best with ~1–2 minutes of clean audio (avoid more than ~3 minutes); recording quality matters more than length.
Speech to text
Pass amodel and an audio source: a file_id from a previous generation or upload, an https URL, or a data-URI (max 25 MB decoded synchronously; up to 100 MB in async mode).
A
file_id lets you transcribe audio you already have on Opper, such as a clip you uploaded or speech you generated with "store": true, without re-sending the bytes. See Files for how files work, lifecycle, and storage quotas.Transcribe a file_id
Response
Transcription is billed per provider-reported audio duration. Segment and word timestamps are returned when the model provides them.
Live transcript (streaming)
Setstream: true to receive the transcript as it’s produced — as Server-Sent Events instead of one JSON body — for a live transcript while the audio is processed. The stream emits transcript.text.delta chunks, then a terminal transcript.text.done with the full transcript and usage, then data: [DONE].
Streaming is supported on models whose params.stt.stream is true (discover them via GET /v3/audio/models) — e.g. mistral/voxtral-mini-2602; other models return a 400. stream and async are mutually exclusive.
Event stream
Long recordings (async)
A synchronous request is a good fit up to roughly an hour of audio. For longer recordings, setasync: true: the request returns immediately with a 202 and a status_url. Poll it until the job is completed, then fetch the transcript from the returned url. Async accepts the same audio sources as the synchronous call (file_id, https URL, or data-URI).
Async also raises the decoded-audio limit from 25 MB to 100 MB (the synchronous cap stays 25 MB). To reach the full 100 MB, pass a file_id or https URL. A request body is limited to 100 MiB, and base64 adds about a third, so an inline data-URI carries at most about 75 MB of audio. The 100 MB limit lines up with the Files per-file limit, so a stored file_id transcribes in full.
An inline data-URI in async mode is held in Opper’s storage in Stockholm until the job starts, then deleted. The transcript is kept for up to 30 days; each status call returns a fresh download link valid for 1 hour.
Submit + poll
mistral/voxtral-mini-2602 is an EU-hosted batch transcription model (speaker diarization, word timestamps, up to 3 h per request) — a good fit for the async flow.Music and sound effects
POST /v3/audio/generations generates audio from a prompt with any model tagged music or sound. It runs synchronously and returns the audio inline as base64, like speech. The same request also answers on POST /v3/audio/music.
A sound effect
Describe one action per request, as the material and distance you want to hear, and setduration_seconds to the length of that action.
Response
"loop": true on a model with the audio_loop capability: the result repeats without a seam, so you can tile it under a whole scene.
Music with timed sections
A plainprompt with duration_seconds gives you a track. When the music has to fit a picture, send sections instead: a timed plan where each section has its own duration_ms, prompt and styles. The sections set the total length. This needs a model with the audio_sections capability.
prompt describes the music and is never sung. Words to be sung go only in that section’s lyrics; leave it out for instrumental music. negative_styles lists what a section should avoid, for example ["vocals"]. Some models take either a top-level prompt or sections, and put instrumental in the section styles rather than the top-level field; they answer 400 saying so. On ElevenLabs music, seed works only with sections: a prompt with a seed answers 400.
A value a model cannot honor (a length, a format,
sections or loop on a model without the capability) answers 400 naming the limit, rather than being ignored. parameters is never checked by Opper; the provider validates it. Music and sound effects are billed per minute of audio or per generation, depending on the model; the model entry’s pricing says which.
Discover models
GET /v3/audio/models lists the audio models available, tagged tts, stt, music or sound, with their voices, formats and capabilities. Filter with ?type=music or ?type=sound, or by capability with ?capability=audio_sections or ?capability=audio_loop. Each model’s params.tts / params.stt block also carries a parameters list of the native passthrough keys it accepts (e.g. ElevenLabs’ exact output_format preset, or a language_code), so you can discover the model-specific knobs for parameters rather than guessing:
What’s next
Realtime voice
Live, two-way voice over WebSocket.
Models
Which models do speech, transcription, music and sound effects.
Observe & Control
Inspect calls and manage provider, region, and spend rules.
Video
Generate video from a prompt or image.