Operation
Generate Music
Generate music tracks through Cannon Studio's audio stack with the same async request lifecycle.
Operation: music.generate
Submit via POST /api/v1/requests
Credits: dynamic
Request fields
promptprovidertitlemodestylemodelcustom_modeinstrumentalvocal_genderstyle_weightweirdness_constraintaudio_weightpersona_idduration_secondsdescription_promptnegative_tagsprompt_influenceseed
Example request
{
"operation": "music.generate",
"input": {
"prompt": "Warm indie-folk underscore with gentle percussion and nostalgic lift.",
"provider": "kie",
"model": "V5",
"title": "Breakfast Nook Theme",
"mode": "auto",
"style": "Indie folk, warm acoustic guitars, soft brushes, nostalgic lift",
"duration_seconds": 45,
"negative_tags": "vocals, harsh synths"
}
}curl -X POST https://www.cannonstudio.app/api/v1/requests \
-H "Content-Type: application/json" \
-H "x-api-key: $CANNON_API_KEY" \
-H "x-idempotency-key: music-generate-001" \
-d @- <<'JSON'
{
"operation": "music.generate",
"input": {
"prompt": "Warm indie-folk underscore with gentle percussion and nostalgic lift.",
"provider": "kie",
"model": "V5",
"title": "Breakfast Nook Theme",
"mode": "auto",
"style": "Indie folk, warm acoustic guitars, soft brushes, nostalgic lift",
"duration_seconds": 45,
"negative_tags": "vocals, harsh synths"
}
}
JSONNotes
- Uses the same music generation stack as the Cannon Studio app.
- Set `provider` to `kie` to access Suno models and custom lyric/style controls.
- Returns a hosted audio URL when the track is ready.
- Best for underscore, mood tracks, and score-like generation.
Success output
{
"task_id": "mus_123",
"asset_type": "audio",
"status": "succeeded",
"audio_url": "https://storage.googleapis.com/.../track.mp3",
"requested_provider": "kie",
"provider": "kie",
"model": "V5",
"title": "Breakfast Nook Theme"
}