Skip to main content
The gateway covers audio with three endpoints:
  • Text to speech: POST /v3/audio/speech turns text into spoken audio.
  • Speech to text: POST /v3/audio/transcriptions turns audio into a transcript.
  • Music and sound effects: POST /v3/audio/generations turns a prompt into a score, a song, a sound effect or a loop of ambience. See Music and sound effects.
All are provider-agnostic: 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 a model 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 pricing depends on the model. Direct Fish Audio S2.1 Pro (fish/s2.1-pro) bills UTF-8 input bytes and reports usage.input_bytes alongside usage.characters. Check the model’s pricing block in GET /v3/audio/models for its billing unit and prices.

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 as de-AT, sv-SE or ja-JP:
Most multilingual models will also read text in another language with any voice, but with a foreign accent. For native-sounding speech, pick a voice made for that language or regional variety.

Expressiveness

A voice can sound flat by default. How you add expression depends on the provider:
  • ElevenLabs exposes voice controls through parameters.voice_settings: lower stability for a more dynamic, emotional read, higher style to exaggerate delivery, and use_speaker_boost. The elevenlabs/eleven_v3 model also understands inline audio tags in the input text — [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)
Manage your voices — all scoped to your project:
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.
A few things to know:
  • 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_at is 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 omit expires_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 a model 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, and each word carries a confidence (between 0 and 1) on models that report one.

Live transcript (streaming)

Set stream: 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
Billing is identical to the synchronous call (per provider-reported audio duration). For long recordings that don’t need a live transcript, use async instead; for two-way live voice, use Realtime.

Long recordings (async)

A synchronous request is a good fit up to roughly an hour of audio. For longer recordings, set async: 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.

Reson8

Reson8 runs speech-to-text on its own hardware in the Netherlands, in de, en, es, fr, fy, it, nl, pl, pt and sv, and keeps no audio or transcripts after processing. reson8/rumble-2-flash is a fast, low-cost engine for bulk transcription. It returns the text only: no timestamps, words or speaker labels, so diarize is refused. It takes language, and in parameters bias_strength and, for raw audio without a container, encoding (pcm_s16le, mulaw or alaw), sample_rate and channels. Any other setting is refused with an error naming it, and Reson8 takes no prompt. Send WAV, MP3, Ogg Opus or raw audio: Opper measures the audio to bill it, so formats it can’t measure (M4A, FLAC, WebM and other containers) are refused with a 400 naming the accepted forms. Convert those first, or use a model that accepts them.
For 8 kHz phone audio without a container, add "parameters": { "encoding": "mulaw", "sample_rate": 8000 }.

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. POST /v3/audio/music is a music-only alias.

A sound effect

Describe one action per request, as the material and distance you want to hear, and set duration_seconds to the length of that action.
Response
For ambience and hums, add "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 plain prompt 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.
A section’s 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. Provider-specific parameters are validated by the provider. Shared-account song references must use the normalized sections fields and Opper song IDs; raw provider song selectors are refused. Music and sound effects are billed per minute of audio or per generation, depending on the model; the model entry’s pricing says which.
Getting usable results
  • One action per sound effect. “A hammer tap” and “a saw stroke” are two requests; mix them yourself.
  • Put section boundaries on the tempo’s phrase grid. At 120 BPM, multiples of 2 or 4 seconds. Boundaries between phrases get moved to the nearest phrase.
  • Keep one instrument palette across sections and vary the intensity. Changing instruments between sections sounds like a different track.
  • Do silences, drops and breakdowns in your mix, not in the prompt. Models often play through a section that asks for “drums out”.
  • Measure what you got (length, loudness per second) before cutting picture to it.

Reuse and edit a song

Models with audio_song_storage can return a reusable song.id when you send store_song: true. Models with audio_upload can also import an existing recording through POST /v3/audio/songs. Use a model with audio_inpainting to mix kept audio and newly generated sections. Discover support with GET /v3/audio/models?capability=audio_inpainting and check the model’s other capabilities. A song_... reference belongs to the API key’s organization and project and to the provider account that created it. It is different from a file_...: store: true saves downloadable audio in Files, while store_song: true saves a provider song reference for editing. You can request both. A generated response returns the reference at song.id; the Songs endpoints use the standard meta/data envelope, so an upload returns it at data.id. The example below imports a 30-second recording, keeps all 30 seconds, then adds a verse, chorus and ending. The generated parts each condition on no more than 30 seconds of the source. Describe the vocal character and instruments in the prompt; conditioning guides the result and does not guarantee an identical singer. Put the words to sing in lyrics.
Python
For full-length tracks you can set async: true and poll the returned status_url. The completed status includes the saved song reference, when requested. If saving a generated song reference fails, the audio still succeeds and store_song_skipped explains that no reusable reference was saved. On ElevenLabs, a plan has at most 30 sections. A kept section contains only song, start_ms and end_ms. Opper sends that source range as a provider audio-reference chunk and delivers the provider’s returned audio bytes unchanged. Opper does not splice, re-encode or normalize the audio. The provider may change a kept range’s waveform, so this feature does not guarantee lossless preservation of the source. A generated section has duration_ms from 3000 to 120000, plus optional prompt, lyrics, styles and negative_styles. The prompt counts as one positive style; the limits are 50 positive styles and 50 negative styles per generated section. Keep the total requested song within 600 seconds. Every source range must span at least 50 ms and fit inside the saved song. A condition_on range is at most 30000 ms long, even when generating a much longer section. condition_on.strength accepts low, medium, high or xhigh; context_adherence accepts low, medium or high. Use these normalized fields and Opper song IDs rather than provider song IDs in parameters.composition_plan.

Cost and song lifetime

Successful song uploads and generations are billed. Opper does not charge customers for rejected song uploads. Under the current policy, Opper absorbs any provider rejection fees, including fees for copyright rejections. Use the returned usage.cost and X-Generation-Cost as the charge, and check the model’s current pricing. At $0.15 per audio minute, a 30-second upload costs $0.075. A composition with 10 newly generated seconds plus 30 kept seconds costs $0.10: kept output is also billed. Requesting an extracted plan does not make an upload free. Song references require a positive project data retention period and expire no later than that period; a shorter current retention rule also limits access. Song upload, store_song and song reuse are unavailable at zero retention. This differs from a store: true Files copy, whose lifetime follows its own Files settings.
ElevenLabs does not expose a public song deletion API or specify the stored song’s retention duration. Deleting or expiring an Opper song reference does not establish that the provider deleted its audio. The delete response therefore reports data.provider_deleted: false. Upload only audio you have permission to use. The provider may reject copyrighted material. Rejected song uploads are not charged to your Opper account.

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.
Last modified on November 16, 2026