Catalog
AIPOSTlive

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).

$0.105
per call
Success
p50 latency
p95 latency
Calls (30d)
0
FlowMusic generation (async) (this step) →Music generation status (async)— the response's native job handle feeds step ②; agents get the same provider-pinned hint in h402.followUp.

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
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}'
CLI
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 USDC

Fill 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.

promptstringrequired

Song description (non-custom mode) or the lyrics (custom mode + vocals). Up to ~5000 chars.

e.g.
modelstringoptionaldefault V4_5

Suno model version.

One of
customModebooleanoptionaldefault false

false = auto-generate style/title from the prompt; true = you control style and title (both then required).

instrumentalbooleanoptionaldefault false

true = music only; false = include vocals.

stylestringoptional

Genre/style tags (required when customMode is true; max 200 chars).

e.g.
titlestringoptional

Song title (required when customMode is true; max 80 chars).

e.g.
vocalGenderstringoptional

Preferred vocal gender.

One of
POST/routes/locus-suno/ai/music-generate-async
Request body
{
  "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.

ResponseExample response
{
  "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.

locus-suno
mpp
Success
p50
Calls
$0.105
Last successful call: Never· Aggregated by h402 — not the source provider