Generate audio
generate_audioGenerate speech or music from text using ElevenLabs and MiniMax models. Supports lyrics for music and adjustable duration.
Instructions
Generate speech or music (ElevenLabs V2/V3/Music, MiniMax Speech/Music). For MiniMax Music pass lyrics. Cost scales with duration.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | Default true. false = return a task id immediately (poll with get_task) | |
| model | Yes | Model code or name, e.g. "ELEVENLABS_V3" or "MINIMAX_SPEECH_28_HD" | |
| lyrics | No | For MiniMax Music | |
| prompt | Yes | Text to speak, or a music description | |
| save_to | No | Directory to save the audio — Pixmax URLs expire | |
| duration | No | Seconds (music models). ElevenLabs Music requires this and only accepts 30 or 60 — auto-snapped to the nearer value | |
| music_mode | No | Required by MiniMax Music (MINIMAX_MUSIC_26) — see Pixmax docs for values |