Suno API Pro v3.1.0

Complete Help Guide — Turn your Suno AI account into a private REST API

Contents

1. What is Suno API Pro? 2. How It Works 3. Legality & Cost-Savings Comparison 4. Installation 5. Dashboard Tour 6. License & Trial 7. Managing Suno Accounts 8. Managing API Keys 9. Using the REST API 10. Chrome Extension 11. Production Deployment (VPS) 12. Troubleshooting 13. API Reference

1. What is Suno API Pro?

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.

Key Benefits

2. How It Works

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.

Core Components

FilePurpose
server.jsExpress web server: dashboard UI + REST API + authentication
store.jsJSON file-based data store for accounts, API keys, and settings
client/suno-client.jsPure Node.js Suno API wrapper (keep-alive, generate, feed, clip, search, credits)
lib/account-manager.jsManages multiple SunoClient instances, round-robin routing, keep-alive lifecycle
license/validate.jsLicense 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

3. Legality & Cost-Savings Comparison

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.

Is cookie-based automation legal?

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.

Why this protects your Commercial Rights:
When you use a shared third-party API wrapper (like Kie.ai or other endpoints found on RapidAPI), the generations are often run on random, shared accounts controlled by that provider. Under Suno's Terms of Service, commercial ownership belongs to the paying subscriber of the generating account. By using Suno API Pro, requests run directly on your own paid Pro or Premier account, ensuring your commercial copyright ownership of the generated music is 100% legally secure!

Cost-Savings Analysis

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

4. Installation

Windows

  1. Unzip Suno-API-Pro-v3.1.0.zip to a folder, e.g. C:\suno-api-pro
  2. Double-click start.bat — this installs dependencies and starts the server
  3. Open http://localhost:8080 in your browser

Or use the terminal:

cd C:\suno-api-pro
npm install
node server.js

Mac / Linux

unzip Suno-API-Pro-v3.1.0.zip
cd Suno-API-Pro
npm install
node server.js

Verify It's Running

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
First-Time Setup Checklist
  1. Open the dashboard → Setup tab → activate your license key (or use the 25-call trial)
  2. Go to AccountsAdd Account → enter your Suno session cookie
  3. Go to API KeysCreate Key → give it a name
  4. Start calling the API!

5. Dashboard Tour

The dashboard has 4 tabs. Here's what each one does:

Dashboard Accounts API Keys Setup

Dashboard Tab

Shows a live overview of your server's status:

Accounts Tab

Manage your Suno accounts:

API Keys Tab

Manage your API keys for external access:

Setup Tab

Server configuration:

6. License & Trial

Trial Mode

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

Activating a License

  1. Go to the Setup tab
  2. Enter your license key (e.g. SUNO-4HVX-IWDI-Z76D)
  3. Click Activate
  4. Status changes to "License: standard" on the Dashboard tab

License keys are stored in license/keys.json. Validation can be local (file-based) or remote (API-based).

7. Managing Suno Accounts

Getting Your Suno Cookie

You need your Suno session cookie to add an account. There are two ways to get it:

Method A: Chrome Extension (Recommended)

  1. Open Chrome → chrome://extensions
  2. Enable Developer mode (top right)
  3. Click Load unpacked → select the extension/ folder
  4. Go to suno.com and log in
  5. Open your dashboard at http://localhost:8080
  6. Go to AccountsAdd Account
  7. Click Extract from Browser — the fields auto-fill

Method B: Manual (Any Browser)

  1. Open Chrome/Firefox/Edge, go to suno.com and log in
  2. Open Developer Tools (F12)
  3. Go to the Application tab (Chrome) or Storage tab (Firefox)
  4. Find Cookiessuno.com
  5. Copy the value of the __session cookie
  6. In the dashboard, paste it in the Cookie String field

Adding an Account

  1. Click Add Account
  2. Give it a name (e.g. "My Main Account")
  3. Paste the Session ID (from the JWT payload's sid field)
  4. Paste the Cookie String
  5. Click Add Account

The server immediately tests the connection. If successful, the account shows "Connected". If not, it shows "Error" with the reason (likely an expired cookie).

Multiple Accounts

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.

8. Managing API Keys

Creating a Key

  1. Go to API KeysCreate Key
  2. Enter a name (e.g. "Production", "Staging", "My App")
  3. Choose an account assignment:
    • Auto (round-robin) — requests go to any active account
    • Specific account — requests always use that account
  4. Click Create Key
  5. Copy the key now — it's shown once, then hidden for security
Important The full key is only displayed once when you create it. If you lose it, rotate the key to generate a new one. Keys are 46-character hex strings prefixed with suno_.

Key Actions

How Key Authentication Works

Every API request must include the API key in one of two ways:

Invalid, expired, or missing keys return 403 Forbidden.

9. Using the REST API

Once you have an API key and at least one Suno account, you can call the API from any programming language or tool.

Base URL

http://YOUR_SERVER:8080/api/v1

Replace YOUR_SERVER with localhost for local use, or your VPS IP/domain for production.

curl Examples

Generate Music

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"
  }'

Check Generation Status

curl "http://localhost:8080/api/v1/feed/TASK_ID" \
  -H "x-api-key: suno_YOUR_KEY_HERE"

Get Clip Details

curl "http://localhost:8080/api/v1/clip/CLIP_ID" \
  -H "x-api-key: suno_YOUR_KEY_HERE"

Search Songs

curl "http://localhost:8080/api/v1/search?query=lo-fi&page=1" \
  -H "x-api-key: suno_YOUR_KEY_HERE"

Check Credits

curl "http://localhost:8080/api/v1/credits" \
  -H "x-api-key: suno_YOUR_KEY_HERE"

Node.js Example

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();

Python Example

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())

Response Format

All successful API calls return JSON:

{
  "success": true,
  "data": { ... }
}

Error responses return:

{
  "error": "description of what went wrong"
}

HTTP Status Codes

CodeMeaning
200Success
400Bad request (missing prompt, no account configured, etc.)
402License/trial limit reached or no license activated
403Invalid or missing API key
502Suno API returned an error (bad cookie, session expired, etc.)

10. Chrome Extension

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.

Installation

  1. Open Chrome and go to chrome://extensions
  2. Enable Developer mode (toggle in top right)
  3. Click Load unpacked
  4. Select the extension folder inside your Suno API Pro directory
  5. The extension icon appears in your toolbar

Usage

  1. Go to suno.com and make sure you're logged in
  2. Open your Suno API Pro dashboard at http://localhost:8080
  3. Go to AccountsAdd Account
  4. Click Extract from Browser
  5. The Session ID and Cookie fields auto-fill instantly
  6. Give the account a name and click Add Account

How It Works

The extension has three parts:

Production note: The extension's manifest only allows access to localhost: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.

Auto-Refresh

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.

11. Production Deployment (VPS)

For 24/7 operation, deploy to any VPS (Linode, DigitalOcean, Vultr, AWS, etc.). A $6/month droplet is sufficient.

Quick Deploy

# 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:

PM2 Commands

pm2 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

Systemd Service

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

Firewall Notes

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

Using a Reverse Proxy (Nginx)

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

12. Troubleshooting

"Invalid API key" (403)

"No Suno account available" (400)

Trial not starting

"Suno API 503" / "Service Suspended"

Account shows "Error" status

Chrome extension not working

Server won't start / port in use

# Change the port
set PORT=9090
node server.js

Or edit .env file to set PORT=9090.

"npm install" fails

13. API Reference

Management Endpoints (no API key needed)

MethodEndpointDescription
GET/api/statusServer status: accounts, keys, license, trial, uptime
GET/api/healthHealth check (accounts connected, uptime)
GET/api/license/statusLicense and trial details
POST/api/license/validateActivate a license key {"license_key": "..."}
GET/api/accountsList all Suno accounts
POST/api/accountsAdd a Suno account {"name","session_id","cookie"}
PATCH/api/accounts/:idUpdate account credentials
DELETE/api/accounts/:idRemove an account
POST/api/accounts/:id/testTest account connection
GET/api/keysList all API keys
POST/api/keysCreate an API key {"name","account_id"?}
DELETE/api/keys/:idDelete an API key
POST/api/keys/:id/rotateRotate (regenerate) an API key

API Endpoints (require x-api-key header)

MethodEndpointDescription
POST/api/v1/generateGenerate music {"prompt","style"?,"title"?}
GET/api/v1/feed/:taskIdGet generation result by task ID
GET/api/v1/clip/:clipIdGet clip details by clip ID
GET/api/v1/search?query=...&page=1Search songs on Suno
GET/api/v1/creditsCheck remaining credits for the account

cURL Quick Reference

# 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"