generate_music
Generate music tracks from text prompts and retrieve audio via job ID after background processing.
Instructions
Generate music — a theme, background track, song, or instrumental bed.
Returns immediately with a job_id; the audio is produced in the background. Poll it with check_jobs([job_id]) to get the file path when it's ready. Fire several calls to mass-produce variants without waiting.
Args:
prompt: What to make, in plain language ("uplifting orchestral intro, soaring strings"
/ "warm lo-fi study loop"). For a sung song, this is the theme/style and Mureka
writes the lyrics; pass lyrics to supply your own. Give either this OR
composition_plan (Eleven Music), not both.
duration: Target length in seconds, if you care (else the model decides).
instrumental: True for no vocals (BGM/underscore); False allows sung vocals.
reference: Optional path (local audio file) or URL to a reference track to steer style
(Mureka only — we upload it and match its vibe; Eleven Music has no such input).
lyrics: Mureka song only — supply exact lyrics (incl. [Verse]/[Chorus] tags) instead
of letting Mureka write them from the prompt. When set, prompt is treated as an
optional style descriptor ("r&b, slow, male vocal").
engine: Provider override. Soft-defaults to Mureka; pass "elevenlabs" to use Eleven
Music instead (honours prompt, duration, instrumental; ignores reference/count).
format: Output format. Mureka defaults to flac (lossless, highest quality, ~half
the size of wav) and also offers "wav" (lossless, uncompressed) and "mp3" (smaller)
— all free from the same generation. ElevenLabs: "mp3"/"wav".
count: How many tracks to generate this call, 1–3 (Mureka only).
composition_plan: Eleven Music only — a structured multi-section plan (intro/verse/
chorus with per-section prompts and durations) instead of a free-text prompt.
Mutually exclusive with prompt; auto-routes the job to ElevenLabs.
store_for_inpainting: Eleven Music only — persist the generated song so later calls
can condition on / inpaint sections of it. Surfaces a song_id in the job result
(via check_jobs) to reference it later.
respect_sections_durations: Eleven Music + composition_plan only — enforce each
section's requested duration strictly.
Returns: {"job_id": ..., "status": "queued", "engine": ...} or {"error": ...}. When a job finishes, check_jobs also returns song_id if store_for_inpainting was set.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| engine | No | ||
| format | No | ||
| lyrics | No | ||
| prompt | No | ||
| duration | No | ||
| reference | No | ||
| instrumental | No | ||
| composition_plan | No | ||
| store_for_inpainting | No | ||
| respect_sections_durations | No |