Music generation (async)
Submit a full-length multi-section song job and poll for the finished audio; supports vocals or instrumental-only prompts. Suno — higher-fidelity songs (~3 min, returns 2 variations).
Provider contract
- Call path
- /routes/locus-suno/ai/music-generate-async
- Method
- POST
- Selected provider
- locus-sunodefault
- Provider price
- $0.105
- Settlement
- Base USDC · x402 · 5% h402 fee
Quickstart
Both commands call the selected provider directly.
curl -X POST '/routes/locus-suno/ai/music-generate-async' \
-H 'content-type: application/json' \
-d '{"prompt":"An upbeat indie-pop song about a sunrise road trip with friends","model":"V4_5","customMode":false,"instrumental":false}'h402 call 'ai/music-generate-async' --provider 'locus-suno' --method POST --json '{"prompt":"An upbeat indie-pop song about a sunrise road trip with friends","model":"V4_5","customMode":false,"instrumental":false}'Parameters & live test
pays real USDCFill the request fields, quote the exact per-call total, then choose x402 or eligible bonus credit explicitly before sending. Only the selected provider's listed parameters are accepted.
promptstringrequiredSong description (non-custom mode) or the lyrics (custom mode + vocals). Up to ~5000 chars.
modelstringoptionaldefault V4_5Suno model version.
customModebooleanoptionaldefault falsefalse = auto-generate style/title from the prompt; true = you control style and title (both then required).
instrumentalbooleanoptionaldefault falsetrue = music only; false = include vocals.
stylestringoptionalGenre/style tags (required when customMode is true; max 200 chars).
titlestringoptionalSong title (required when customMode is true; max 80 chars).
vocalGenderstringoptionalPreferred vocal gender.
{
"prompt": "An upbeat indie-pop song about a sunrise road trip with friends",
"model": "V4_5",
"customMode": false,
"instrumental": false
}This starts a job — poll Music generation status (async) (ai/music-generate-async-status) for the final result.
{ "data": { "success": true, "data": { "code": 200, "msg": "success", "data": { "taskId": "e5ad37631a1b428516a1361c22303f0d" } } }, "h402": { "routeId": "ai/music-generate-async", "provider": "locus-suno", "selectedCandidateId": "ai/music-generate-async/locus-suno", "routing": "manual", "followUp": { "routeId": "ai/music-generate-async-status", "path": "/routes/locus-suno/ai/music-generate-async-status", "method": "POST", "params": { "taskId": "e5ad37631a1b428516a1361c22303f0d" }, "docsUrl": "https://h402-test.hunt.town/catalog/ai/music-generate-async-status", "instruction": "This response is a job receipt, not the final result. Poll POST /routes/locus-suno/ai/music-generate-async-status with the returned id as taskId ($0.005 per poll) until the provider reports completion — terminal status labels are provider-native, and a failure status means the job errored. Final-result example: https://h402-test.hunt.town/catalog/ai/music-generate-async-status" }, "paidBy": "x402-exact" } }
Providers
Choose a provider for this task. The catalog recommends the current default from quality, reliability, and price; your selected provider stays pinned. Listed prices are provider prices; settlement adds a 5% h402 fee.
- Success
- —
- p50
- —
- Calls
- —