Generate Audio
Changed onGenerate speech, music, or a sound effect from text (metered).
Pick mode first: text_to_speech (a voice saying your exact words — prompt IS the script), text_to_music, or text_to_sfx. The model card on GET /v1/media/models says which modes each model serves.
Managed voice models (elevenlabs-native-*, listed by GET /v1/voices/capabilities) are a durable task lane instead: the answer is an audio_generation task envelope (or, with quote: true, an audio_generation_quote that starts nothing). wait: false returns it queued; poll GET /v1/media/generate-audio/{task_id} no sooner than its retry_after_ms, and stop it with POST /v1/media/generate-audio/{task_id}/cancel. voice is a vox_ id, speech_to_speech converts a source_audio upload, and an idempotency_key makes the call safe to repeat: the same key and input return the same task (replayed: true), whatever its state. Everything below this paragraph describes the other models.
Synchronous: the render runs inside this call and there is no wait: false task lane. Speech returns in seconds. Music and sound effects can be asked for at up to 600 seconds of output and may take correspondingly longer; a render that outruns this call's wait is asked to cancel and reported as a retryable 503. Repeat that call with the same idempotency_key: it adopts the existing provider job, so it returns the audio if the render finished anyway and reports it cancelled if it did not — and it can never pay for a second render. Only once it reports cancelled is a new request worth making — and that one needs a NEW idempotency_key as well as a shorter duration or fewer samples, since a changed payload under the old key is a 409 idempotency_conflict.
Direct elevenlabs-eleven-v4-turbo speech also returns ElevenLabs character alignment and normalized_alignment in each result when available, so captions can use the generated narration's timings without a transcription call.
results carries one entry per delivered take (num_samples), applied reports the knobs that actually ran, and adjustments names every field that differed from the ask, with a reason — read them before describing the output to a user. A take that came back more than half a second longer than duration_seconds is trimmed to it with a short fade-out; the full take is results[].untrimmed, and an adjustments entry says so. A take that missed by more than max(2 s, 10%) and was not trimmed is reported there too.
In a Voyager-billed workspace, the direct ElevenLabs models (speech, music and sound effects) are billed to Voyager credits, and the receipt says so (usage.billing_product: "voyager", usage.estimated_credits in Voyager credits). Every fal-hosted model, the -fal ElevenLabs copies included, is refused with 403 not_available_on_voyager_billing.
Request
- Base URLhttps://api.moda.app/v1
- URLhttps://api.moda.app/v1/media/generate-audio
- AuthHTTP bearer
Headers
Calendar-dated API version pin. New integrations should pin 2026-05-01 to opt into the newest response shapes. For back-compat the server also accepts requests with no header and resolves them to the current default (today: 2026-04-12); that default advances on each sunset date. Any unsupported value returns 400 unsupported_version.
Request body
Response
Successful Response
Changes
- info
endpoint added
- info