页面简介
Suno API documentation hub: authentication, quickstart code, every music-generation endpoint (create, extend, cover, stems, MIDI, personas), webhooks, and error handling.
正文摘录
Developer documentationSuno API DocumentationEverything you need to ship AI music generation: quickstart, authentication, the full endpoint catalog (create, extend, cover, stems, MIDI, personas), and signed webhooks.Full API ReferenceGet API Key — 30 free creditsSuno API overviewPricing & creditsQuickstartYour first song in three steps1Create an API key. Sign up (30 free credits included) and generate a key from the dashboard.2Create a generation task.curl -X POST https://api.aimusicapi.ai/api/v1/suno/create \ -H "Authorization: Bearer $AIMUSICAPI_KEY" \ -H "Content-Type: application/json" \ -d '{ "task_type": "create_music", "custom_mode": false, "gpt_description_prompt": "an upbeat synthwave track about night driving", "mv": "chirp-v5", "webhook_url": "https://yourapp.com/api/music-callback" }'3Receive the result. Poll GET /api/v1/suno/task/:id or let the webhook deliver the final audio URLs to your endpoint (typical generation: 1–3 minutes).Endpoint catalogEvery endpoint, one pageEach entry links to the full reference with request and response schemas, parameters, and copy-paste examples.Music generationCreate musicPOST /api/v1/suno/createGenerate full songs with vocals or instrumentals. Custom mode (your lyrics + style) or description mode (one prompt). Models v3.5 → V5.Full referenceGenerate lyricsPOST /api/v1/suno/lyricsStandalone lyric generation from a theme, style, and mood.Full referenceTask statusGET /api/v1/suno/task/:idPoll a generation task. Or skip polling entirely with webhooks.Full referenceTransform existing audioExtend songPOST /api/v1/suno/upload-extendLengthen a track while keeping style and vocal continuity.Full referenceCover / restylePOST /api/v1/suno/upload-coverRe-render a song in a different style or with different vocals.Full referenceReplace sectionPOST /api/v1/suno/replace-sectionRegenerate a specific time range inside an existing song.Full referenceUpload audioPOST /api/v1/suno/uploadBring your own audio in for any transform workflow.Full referenceAudio processingStem separationPOST /api/v1/suno/stems/basic | /stems/full4-track split, or full 12-track instrument isolation.Full referenceAudio to MIDIPOST /api/v1/suno/audio-to-midiExtract multi-instrument MIDI from any generated song.Full referenceWAV exportPOST /api/v1/suno/wavLossless WAV render of any clip for production masters.Full referenceVoices & personasCreate personaPOST /api/v1/suno/personaBuild a reusable AI voice from a reference clip and generate with it.Full referenceOther model families (same API key)Producer AI (Lyria-class)POST /api/v1/producer/createFast, high-fidelity generation — full songs in ~30 seconds.Full referenceAuthenticationBearer token on every request: Authorization: Bearer <your key>. Keys are created, rotated, and revoked from the dashboard; store them server-side only.Webhooks (recommended over polling)Pass webhook_url at task creation. Deliveries fire on succeeded, streaming, and failed, and are signed with HMAC-SHA256 (X-Webhook-Timestamp + X-Webhook-Signature headers):// Verify webhook signatures (HMAC-SHA256 over "timestamp.rawBody") const message = `${req.headers["x-webhook-timestamp"]}.${rawBody}` const expected = crypto .createHmac("sha256", process.env.WEBHOOK_SECRET) .update(message) .digest("hex") // compare with req.headers["x-webhook-signature"] ("sha256=<hex>")QUESTIONSFrequently Asked QuestionsWhere is the full Suno API documentation?How do I get a Suno API key?Which model versions does the API document?Can I get official Suno CDN links for generated files?Does the API support webhooks?What do failed generations cost?Is there an API sandbox to test without spending credits?