Media

Music generation

Songs with or without lyrics.

POST/api/music-generate— 5,000 cr (returns 1–2 variations)

FieldTypeRequiredDescription
customModebooleanyesfalse = simple (only prompt, ≤500 chars). true = custom: lyrics (prompt) or style, or both; an instrumental needs style. title optional.
instrumentalbooleannotrue = no vocals.
promptstringsimpleIdea (≤500, simple) or lyrics (≤5000, custom with vocals).
stylestringcustomGenre / mood (≤1000 chars). Required for a custom instrumental.
titlestringnoTrack title (≤80 chars).
vocalGenderstringnom / f — custom mode with vocals only.
cURL
curl -X POST "https://www.dubvoice.ai/api/music-generate" \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "customMode": true, "instrumental": false,
    "title": "Childhood Dreams", "style": "Folk, Acoustic, Nostalgic",
    "prompt": "Verse 1: When I was young...",
    "vocalGender": "f"
  }'

→ { "success": true, "task_id": "5c79...be8e" }

GET/api/music-generate?id=<task_id>— poll

JSON
{
  "status": "succeeded",
  "audio_url": "https://your-storage.supabase.co/.../music_xxx.mp3",
  "audio_urls": ["...mp3", "...mp3"],
  "task_id": "5c79...be8e",
  "credits_used": 5000
}

Search docs

Find a page or an endpoint