Adding AI-generated music to a product used to mean licensing a stock library or hiring a composer. In 2026, you can call Suno v4.5 and get a full 4-minute song with vocals, harmony and production — in about 60 seconds of wallclock time, for less than $0.50.

This post walks through a complete integration, from first curl to webhook-driven audio delivery in your app.

1. Get an API key

Sign up at aimarcus.eu/aigenerate/register. $10 free on signup is enough for ~20 Suno v4.5 songs to get you started.

2. Fire off a generation

POST https://aimarcus.eu/aigenerate/api/v1/generate
Authorization: Bearer sk-aig-YOUR_KEY
Content-Type: application/json

{
  "model": "V4_5",
  "prompt": "Upbeat synthwave, driving bass, retro 80s vibe",
  "customMode": false,
  "instrumental": false,
  "callBackUrl": "https://your-app.com/webhooks/suno"
}

Response:

{ "code": 200, "data": { "taskId": "f0147a2e78670ecbce46020219f931a1" } }

3. Custom lyrics

Set customMode: true and pass your lyrics in the prompt. Suno handles melody, arrangement, harmony and vocal performance.

{
  "model": "V4_5",
  "customMode": true,
  "prompt": "[Verse 1]\nWaking up to a city that never sleeps...",
  "style": "indie pop ballad",
  "title": "Midnight City",
  "callBackUrl": "..."
}

4. Poll or webhook

Two options:

  • Polling: GET /api/v1/generate/record-info?taskId=... every 5 seconds until state="success". Poll endpoints are free — they don't count against your rate limit or cost.
  • Webhook: provide a callBackUrl. When the song is ready, we POST the result JSON to your URL with an HMAC-SHA256 signature in X-AI-Signature.

5. Final payload

Successful completion returns two audio URLs (Suno generates variations):

{
  "data": {
    "state": "success",
    "response": {
      "sunoData": [
        { "audioUrl": "https://.../track-a.mp3", "duration": 185 },
        { "audioUrl": "https://.../track-b.mp3", "duration": 194 }
      ]
    }
  }
}

Both are MP3, 44.1 kHz, ready to play. They live at the URL indefinitely but for production you should download and rehost them on your own CDN.

6. Production tips

  • Cache on your CDN — Suno URLs are fast but you control your own SLA when you host.
  • Store the taskId in your DB keyed to the user request — makes retry and audit trivial.
  • Set a daily spend cap in dashboard settings if you expose this to end users.
  • For podcast-style spoken narration, use a dedicated TTS model instead (faster and cheaper than Suno).

That's the full loop. Same pattern works for Suno v3.5, v4, v4.5 Plus, MusicGen and Mureka — just change the model field.