Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/gcui-art/suno-api/llms.txt

Use this file to discover all available pages before exploring further.

Environment variables

All deployment options share the same set of environment variables. Configure these before starting the server.
VariableRequiredDescription
SUNO_COOKIEYesFull Cookie header string copied from your browser’s DevTools while on suno.com
TWOCAPTCHA_KEYYesAPI key from your 2Captcha account
BROWSERYesBrowser to use for CAPTCHA solving. chromium (recommended) or firefox
BROWSER_GHOST_CURSORNoSimulate smooth mouse movements with ghost-cursor-playwright. Set to false — it does not reduce CAPTCHA frequency
BROWSER_LOCALENoBrowser locale sent to 2Captcha workers. en or ru recommended for fastest solving
BROWSER_HEADLESSNoRun the browser without a visible window. Set to true on servers
BROWSER_DISABLE_GPUNoDisable GPU acceleration. Set automatically to true inside Docker

Vercel is the fastest way to get a public HTTPS endpoint without managing infrastructure.
Vercel serverless functions have a 10-second execution timeout on the Hobby plan. Suno generation requests often take longer than that. If you hit timeouts frequently, use the Docker or local deployment instead, or upgrade to a Vercel Pro plan (60-second limit).
1

Click Deploy

Deploy with VercelOr open the URL directly:
https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fgcui-art%2Fsuno-api&env=SUNO_COOKIE,TWOCAPTCHA_KEY,BROWSER,BROWSER_GHOST_CURSOR,BROWSER_LOCALE,BROWSER_HEADLESS&project-name=suno-api&repository-name=suno-api
2

Set environment variables

Vercel will prompt you to fill in the environment variables during the clone flow. Set at minimum:
SUNO_COOKIE=<your cookie>
TWOCAPTCHA_KEY=<your 2captcha key>
BROWSER=chromium
BROWSER_GHOST_CURSOR=false
BROWSER_LOCALE=en
BROWSER_HEADLESS=true
You can also add or change variables later in Project Settings → Environment Variables in the Vercel dashboard.
3

Wait for the deployment to finish

Vercel will fork the repository to your GitHub account, build the Next.js app, and deploy it. This usually takes 2–4 minutes.
4

Test the deployment

Replace <your-vercel-domain> with the domain Vercel assigned to your project:
curl https://<your-vercel-domain>/api/get_limit
Expected response:
{
  "credits_left": 50,
  "period": "day",
  "monthly_limit": 50,
  "monthly_usage": 50
}

Build docs developers (and LLMs) love