Quickstart
Get your first song generated in under 5 minutes.
API Reference
Explore all endpoints with full parameter docs.
Deployment
Deploy with Vercel, Docker, or run locally.
Agent Integration
Use Suno API as a tool in GPTs, Coze, and LangChain.
What is Suno API?
Suno API is an open-source REST API wrapper for Suno.ai — the AI music generation service. Because Suno does not yet offer an official API, this project bridges that gap by automating the web interface and exposing a clean HTTP API you can call from any language or platform.Suno API is an unofficial open-source project intended for learning and research purposes. It is not affiliated with or endorsed by Suno.ai.
Key features
Music from text prompts
Send a text description and get back audio URLs for two AI-generated song variations.
Custom Mode
Control lyrics, style tags, title, and negative tags for precise creative direction.
Automatic CAPTCHA solving
Uses 2Captcha and Playwright to solve hCaptcha challenges automatically — no manual intervention.
OpenAI-compatible endpoint
Drop-in
/v1/chat/completions endpoint lets you use Suno API with any OpenAI-compatible client.Extend & concat audio
Extend existing clips or concatenate extensions into a full song.
Stems & lyric timing
Separate vocal and instrumental tracks; get word-level timestamp data.
One-click deploy
Deploy to Vercel in one click, or run with Docker Compose — no complex setup.
Multi-account support
Override the default cookie per-request to rotate across multiple Suno accounts.
How it works
Suno API runs as a Next.js application. It authenticates with Suno using your browser cookie, maintains an active session automatically, and proxies generation requests to Suno’s internal API. When Suno requires hCaptcha verification, it spins up a headless Playwright browser, sends the CAPTCHA image to 2Captcha for solving, and completes the challenge on your behalf.Supported endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/generate | POST | Generate music from a text prompt |
/api/custom_generate | POST | Generate with custom lyrics, tags, and title |
/api/extend_audio | POST | Extend an existing audio clip |
/api/concat | POST | Concatenate clip extensions into a full song |
/api/generate_lyrics | POST | Generate lyrics from a prompt |
/api/generate_stems | POST | Separate audio into vocal and instrumental stems |
/api/get_aligned_lyrics | GET | Get word-level lyric timestamps |
/api/get | GET | Retrieve audio info by ID(s) |
/api/clip | GET | Get clip details by ID |
/api/get_limit | GET | Check remaining credit quota |
/v1/chat/completions | POST | OpenAI-compatible generation endpoint |
Get started
Obtain your Suno cookie
Log in to suno.com/create, open DevTools → Network tab, refresh, and copy the
Cookie header from any request containing __clerk_api_version.Get a 2Captcha API key
Register at 2captcha.com, top up your balance, and copy your API key. Suno requires hCaptcha solving for music generation.
Deploy Suno API
Deploy to Vercel with one click, or run locally with
npm run dev. Set the SUNO_COOKIE and TWOCAPTCHA_KEY environment variables.