Obtain your Suno cookie
Suno API authenticates with Suno using your browser session cookie.
- Open suno.com/create in your browser.
- Press
F12(or right-click → Inspect) to open Developer Tools. - Go to the Network tab and refresh the page.
- In the filter box, type
__clerk_api_versionto find the Clerk authentication request. - Click on that request, then open the Headers tab.
- Scroll to the Request Headers section, find Cookie, and copy the entire value.
Get a 2Captcha API key
Suno requires an hCaptcha challenge on every generation. Suno API solves it automatically using 2Captcha.
- Register a new 2Captcha account.
- Top up your balance (a small amount covers many requests).
- Copy your API key from the recognition page.
Verify the server is running
Call the quota endpoint to confirm your cookie is valid and the server is healthy:Expected response:If you see this response, the server is connected to Suno and your session is active.
Generate your first song
Send a prompt to
/api/generate. The endpoint returns immediately with two clip objects (Suno always generates two variations). The status field will be "submitted" or "queued" — audio is not ready yet.Poll for completion
Take the When
id values from the generate response and poll /api/get until status becomes "streaming" or "complete". At that point audio_url contains a playable link.status is "streaming", the file is being written but is already playable. When it is "complete", the full audio file is available.Next steps
Deployment
Deploy to Vercel, Docker Compose, or run locally in production
API Reference
Full endpoint documentation including custom mode, stems, and lyrics
