Generate audio
generate_audioGenerate text-to-speech, sound effects, multi-voice dialogue, transcripts, voice changes, or cleaned audio from text or audio URLs.
Instructions
Speech and sound: text-to-speech (default; optional voice_id, see list_resources), sound effects (model 'sfx', optional duration), multi-voice dialogue (model 'dialogue': pass the turns in the dialogue parameter, not prompt), transcription (model 'stt': pass audio_url, get text back; optional diarize/language_code), voice change (model 'voice-changer': audio_url + target voice_id) and audio cleanup (model 'voice-isolation': audio_url). Returns the audio URL (or the transcript for 'stt'). For music, use generate_music.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | Default true: wait for the job and return the finished result. Set false to get the task_id back immediately and poll with get_task — use for long jobs (high-quality video, full songs) or when the connection might time out. | |
| model | No | Model, as a short alias or full id. Aliases: 'tts' (default, text-to-speech), 'sfx' (sound effect), 'dialogue', 'stt' (transcribe), 'voice-changer' (transform a voice, needs audio_url), 'voice-isolation' (clean/isolate audio, needs audio_url). Full ids also work. For music use generate_music. | |
| prompt | No | The content to synthesize: spoken text for text-to-speech/dialogue, or the sound description for sound effects. Not used for transcription (pass audio_url instead). | |
| diarize | No | Transcription: label who is speaking (speaker diarization). Default false. | |
| dialogue | No | Model 'dialogue' only: the conversation as an array of turns, each { text, voice_id } (voice ids from list_resources). Replaces prompt for dialogue. | |
| duration | No | Duration in seconds (max 36000 = 10h, a billing ceiling this server imposes — not a model limit). Sound effects: omit for automatic. Transcription: the job is PRICED by this declared length (defaults to 300s = 5 min) — pass the audio's real length or short clips are overcharged. | |
| voice_id | No | Voice id for text-to-speech. Discover available voices with the list_resources tool. Falls back to a default voice if omitted. | |
| audio_url | No | Source audio (public https URL) for audio-input models: transcription ('stt'), voice change ('voice-changer'), and cleanup ('voice-isolation'). For local files, upload_file first. | |
| callback_url | No | Optional webhook URL. When set, the tool returns immediately with the task_id and UnificAlly POSTs the result to this URL when the task finishes. Webhook body: { task_id, status: 'completed'|'failed', data: { video_url | image_url | audio_url | ... }, error_message? } — note the media arrives under 'data', not 'output'. Use for long jobs instead of waiting. | |
| confirm_cost | No | Only relevant if the operator enabled a spend guard. When a call exceeds the configured confirm threshold it returns a quote; retry with confirm_cost: true to proceed. Safe to ignore otherwise. | |
| language_code | No | Transcription: optional ISO 639 language code (e.g. 'eng', 'spa'). Auto-detected when omitted. | |
| provider_options | No | Escape hatch for model-specific fields not exposed as named parameters (e.g. Kling multi_shots, Flux steps). Merged into the API 'input' payload. Rejected: fields the tool already manages (prompt, media URLs, task_id, ...) and reserved routing/billing/auth keys (model, callback_url, dry_run, api_key, authorization) — switch models with the 'model' parameter, not here. See https://docs.unifically.com for per-model fields. |