Complete Help Guide — Turn your Suno AI account into a private REST API
Suno API Pro is a self-hosted API gateway that converts your Suno AI account into a private REST API. You install it on your own server or computer, add one or more Suno accounts, create API keys, and then call any REST API endpoint to generate music, fetch clips, search songs, and check credits — just like an official API.
At a high level, Suno API Pro sits between your application and Suno AI's web backend:
Your App / Script / Website
│
▼
┌─────────────────────┐
│ Suno API Pro │ ← Your server, port 8080
│ (server.js) │
│ │
│ ┌───────────────┐ │
│ │ Account 1 │ │ ← Suno session + cookies
│ │ Account 2 │ │ ← Second account (optional)
│ │ Account 3 │ │ ← Third account (optional)
│ └───────────────┘ │
└─────────┬───────────┘
│
▼
Suno AI Servers
(studio-api.prod.suno.com)
Each account you add creates a persistent connection to Suno. When you call the API, your request is routed to one of your accounts (either a specific one or round-robin across all active ones). The response is returned to your app in standard JSON.
| File | Purpose |
|---|---|
server.js | Express web server: dashboard UI + REST API + authentication |
store.js | JSON file-based data store for accounts, API keys, and settings |
client/suno-client.js | Pure Node.js Suno API wrapper (keep-alive, generate, feed, clip, search, credits) |
lib/account-manager.js | Manages multiple SunoClient instances, round-robin routing, keep-alive lifecycle |
license/validate.js | License key validation (local file + optional remote API) |
dashboard/public/ | Web UI: HTML, CSS, and JavaScript for the management dashboard |
extension/ | Chrome extension for one-click cookie extraction |
Suno API Pro is built around standard, secure browser/session automation. Because Suno AI does not offer an official public API for developers, this self-hosted gateway provides the only reliable way to integrate Suno into your apps and workflows programmatically.
Yes, absolutely. Automating your own interaction with services using session identifiers you legally own is a standard RPA (Robotic Process Automation) and scripting technique. It does not bypass paywalls, crack digital rights management (DRM), or perform unauthorized access to private systems. It simply automates the browser commands that you would otherwise execute manually.
Because third-party APIs must host their own infrastructure and pay for Suno subscriptions, they charge high pay-as-you-go markup rates. Running your own self-hosted Suno API Pro gateway completely eliminates these middleman markups. You only pay for your raw Suno subscriptions.
| Metric | Typical Third-Party API (e.g., Kie.ai) | Suno API Pro (Self-Hosted + Suno Pro) | Your Savings |
|---|---|---|---|
| Pricing Model | Pay-as-you-go credits / points | Flat Suno Subscription ($10 or $30/mo) | Zero per-call fees |
| Cost for 250 Songs (500 clips) | ~$20.00 (avg $0.08 per song) | $10.00/mo (Suno Pro Plan) | Save 50% ($10.00 saved) |
| Cost for 1,000 Songs (2,000 clips) | ~$80.00 (avg $0.08 per song) | $30.00/mo (Suno Premier Plan) | Save 62.5% ($50.00 saved) |
| Cost for 5,000 Songs (10,000 clips) | ~$400.00 (avg $0.08 per song) | $150.00/mo (5 Premier Accounts round-robin) | Save 62.5% ($250.00 saved) |
| Multi-Account Routing | ❌ None (Shared pools, no routing control) | ✔️ Unlimited accounts with automatic load-balancing | Enterprise control |
Suno-API-Pro-v3.1.0.zip to a folder, e.g. C:\suno-api-prostart.bat — this installs dependencies and starts the serverOr use the terminal:
cd C:\suno-api-pro
npm install
node server.js
unzip Suno-API-Pro-v3.1.0.zip
cd Suno-API-Pro
npm install
node server.js
Open http://localhost:8080 — you should see the Suno API Pro dashboard. You can also check the API status endpoint:
curl http://localhost:8080/api/status
The dashboard has 4 tabs. Here's what each one does:
Shows a live overview of your server's status:
Manage your Suno accounts:
Manage your API keys for external access:
Server configuration:
When you first start the server without a license key, trial mode is automatically available:
Trial activates on your first API call (not when the server starts). You can check remaining trial calls in the Setup tab or via the API:
curl http://localhost:8080/api/license/status
SUNO-4HVX-IWDI-Z76D)License keys are stored in license/keys.json. Validation can be local (file-based) or remote (API-based).
You need your Suno session cookie to add an account. There are two ways to get it:
chrome://extensionsextension/ folderhttp://localhost:8080suno.com__session cookiesid field)The server immediately tests the connection. If successful, the account shows "Connected". If not, it shows "Error" with the reason (likely an expired cookie).
You can add as many Suno accounts as you want. When an API key is set to "Auto" (round-robin), the server distributes requests across all active accounts, starting with the least recently used one. If one account fails, the next account is tried automatically.
suno_.
Every API request must include the API key in one of two ways:
x-api-key: suno_YOUR_KEY?api_key=suno_YOUR_KEYInvalid, expired, or missing keys return 403 Forbidden.
Once you have an API key and at least one Suno account, you can call the API from any programming language or tool.
http://YOUR_SERVER:8080/api/v1
Replace YOUR_SERVER with localhost for local use, or your VPS IP/domain for production.
curl -X POST "http://localhost:8080/api/v1/generate" \
-H "x-api-key: suno_YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A chill lo-fi hip hop beat with vinyl crackle",
"style": "Lofi Hip Hop",
"title": "Afternoon Study"
}'
curl "http://localhost:8080/api/v1/feed/TASK_ID" \
-H "x-api-key: suno_YOUR_KEY_HERE"
curl "http://localhost:8080/api/v1/clip/CLIP_ID" \
-H "x-api-key: suno_YOUR_KEY_HERE"
curl "http://localhost:8080/api/v1/search?query=lo-fi&page=1" \
-H "x-api-key: suno_YOUR_KEY_HERE"
curl "http://localhost:8080/api/v1/credits" \
-H "x-api-key: suno_YOUR_KEY_HERE"
const API = 'http://localhost:8080/api/v1';
const KEY = 'suno_YOUR_KEY_HERE';
async function generateMusic() {
const res = await fetch(API + '/generate', {
method: 'POST',
headers: { 'x-api-key': KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({ prompt: 'A jazz piano solo', style: 'Jazz' })
});
const data = await res.json();
console.log(data);
}
generateMusic();
import requests
API = 'http://localhost:8080/api/v1'
KEY = 'suno_YOUR_KEY_HERE'
response = requests.post(f'{API}/generate', json={
'prompt': 'Electronic dance track with heavy bass',
'style': 'EDM'
}, headers={'x-api-key': KEY})
print(response.json())
All successful API calls return JSON:
{
"success": true,
"data": { ... }
}
Error responses return:
{
"error": "description of what went wrong"
}
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad request (missing prompt, no account configured, etc.) |
| 402 | License/trial limit reached or no license activated |
| 403 | Invalid or missing API key |
| 502 | Suno API returned an error (bad cookie, session expired, etc.) |
The Chrome extension eliminates manual cookie copying. With one click, it reads your Suno session from suno.com, extracts the session ID from the JWT, and sends everything to the dashboard.
chrome://extensionsextension folder inside your Suno API Pro directoryhttp://localhost:8080The extension has three parts:
content.js) — injected into the dashboard page, listens for the "Extract" button clickbackground.js) — accesses chrome.cookies API to read suno.com cookies, decodes the JWT to get the session IDpopup.html + popup.js) — shows current status and lets you manually forward credentialslocalhost:8080 by default. If you host the dashboard on a VPS with a custom domain, add your domain to the host_permissions and content_scripts matches arrays in extension/manifest.json.
The extension automatically refreshes your cookies every 25 minutes (via chrome.alarms). It also forwards credentials immediately when Chrome starts or the extension is installed.
For 24/7 operation, deploy to any VPS (Linode, DigitalOcean, Vultr, AWS, etc.). A $6/month droplet is sufficient.
# Upload the ZIP to your VPS
scp Suno-API-Pro-v3.1.0.zip user@YOUR_VPS_IP:~/
# SSH into your VPS
ssh user@YOUR_VPS_IP
# Extract and deploy
unzip Suno-API-Pro-v3.1.0.zip
sudo bash deploy.sh
The deploy script (deploy.sh) handles everything:
npm install -g pm2)/opt/suno-api-propm2 status # View running processes
pm2 logs suno-api-pro # View live logs
pm2 restart suno-api-pro # Restart the server
pm2 stop suno-api-pro # Stop the server
pm2 startup # Auto-start on server reboot
If you prefer systemd over PM2, use the provided suno-api-pro.service:
sudo cp suno-api-pro.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable suno-api-pro
sudo systemctl start suno-api-pro
sudo systemctl status suno-api-pro
Make sure port 8080 is open in your VPS firewall:
# Ubuntu with ufw
sudo ufw allow 8080/tcp
# Or using iptables
sudo iptables -A INPUT -p tcp --dport 8080 -j ACCEPT
For a custom domain with HTTPS, set up Nginx as a reverse proxy:
server {
listen 80;
server_name api.yourdomain.com;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Then use Certbot to add HTTPS: sudo certbot --nginx -d api.yourdomain.com
x-api-key (lowercase, hyphens)license/keys.json has "trial": { "enabled": true }localhost:8080)chrome://extensions → click the refresh icon on the extension card# Change the port
set PORT=9090
node server.js
Or edit .env file to set PORT=9090.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/status | Server status: accounts, keys, license, trial, uptime |
| GET | /api/health | Health check (accounts connected, uptime) |
| GET | /api/license/status | License and trial details |
| POST | /api/license/validate | Activate a license key {"license_key": "..."} |
| GET | /api/accounts | List all Suno accounts |
| POST | /api/accounts | Add a Suno account {"name","session_id","cookie"} |
| PATCH | /api/accounts/:id | Update account credentials |
| DELETE | /api/accounts/:id | Remove an account |
| POST | /api/accounts/:id/test | Test account connection |
| GET | /api/keys | List all API keys |
| POST | /api/keys | Create an API key {"name","account_id"?} |
| DELETE | /api/keys/:id | Delete an API key |
| POST | /api/keys/:id/rotate | Rotate (regenerate) an API key |
x-api-key header)| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/generate | Generate music {"prompt","style"?,"title"?} |
| GET | /api/v1/feed/:taskId | Get generation result by task ID |
| GET | /api/v1/clip/:clipId | Get clip details by clip ID |
| GET | /api/v1/search?query=...&page=1 | Search songs on Suno |
| GET | /api/v1/credits | Check remaining credits for the account |
# Save your key for reuse
KEY="suno_YOUR_KEY_HERE"
BASE="http://localhost:8080/api/v1"
# Generate
curl -X POST "$BASE/generate" -H "x-api-key: $KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"a lo-fi beat","style":"Lofi"}'
# Feed (replace TASK_ID)
curl "$BASE/feed/TASK_ID" -H "x-api-key: $KEY"
# Clip (replace CLIP_ID)
curl "$BASE/clip/CLIP_ID" -H "x-api-key: $KEY"
# Search
curl "$BASE/search?query=jazz" -H "x-api-key: $KEY"
# Credits
curl "$BASE/credits" -H "x-api-key: $KEY"