SunoAIGenerator
No key, just your session cookie — while it lasts
- MP3 URL 1
- MP3 URL 2
- Local Path 1
- Local Path 2
The name is half a lie. "Suno API" sounds like an official endpoint with a key, but SunoAIGenerator doesn't call any official API and there's nothing to sign up for - it drives Suno's private web backend using your logged-in session cookie, and it spends your credits. This is the node that drops full song generation into a ComfyUI graph, and if you're here because a workflow you downloaded references it, the honest headline is: it worked great in late 2024, and the pack's own README now opens with "API NOT WORKING ANYMORE, DON'T USE." More on that below.
It comes from the GentlemanHu/ComfyUI-SunoAI pack, a thin ComfyUI wrapper around the well-known unofficial imyzhang/suno-api Python library. No local model, no weights, no GPU - just network calls. You write a song idea, it queues a generation on your Suno account, waits for the clips to render, downloads the MP3s, and hands you URLs and local file paths to wire into the rest of your workflow (a music-video pipeline, a slideshow, whatever).
How it works
On node initialization it reads SUNO_COOKIE from your .env file via python-dotenv. That cookie is the entire credential: the client impersonates a Chrome browser (via curl_cffi's TLS fingerprinting), exchanges the cookie for a session JWT through Suno's Clerk auth, then POSTs to studio-api.suno.ai/api/generate/v2 with the model hardcoded to chirp-v3-0. It polls until two clips are ready (with a 600-second timeout) and saves both to ComfyUI/output/suno_ai_songs/ as {filename_prefix}_{timestamp}_sunoai_1.mp3 and _2.mp3. Suno returns two songs per request - that's why the node is built around pairs.
Inputs that matter
The five inputs all have defaults, so you can technically just type a prompt and go:
- prompt - your song idea. When
customis off (default), Suno's own model writes the lyrics from this description. Whencustomis on, this field becomes your lyrics (or your style description - see below). - custom - the big switch.
false(default) means "describe the song, Suno writes it."truemeans you take control of the content. - tags - style keywords. Only read when
custom=trueandinstrumental=false; it's the "genre/mood" slot next to your custom lyrics. - instrumental - set to
truefor instrumental-only. Note the quirk: withcustom=trueandinstrumental=true, yourpromptis treated as the style/mood description, not lyrics. - filename_prefix - prefix for the saved MP3s. Default
SunoAI_.
The four outputs are MP3 URL 1, MP3 URL 2, Local Path 1, Local Path 2 - the two remote URLs and the two local file paths. For anything downstream, use the local paths: they're reliable, the CDN URLs expire.
Installing it
Via ComfyUI Manager (search "ComfyUI Suno API" or "Suno"), or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/GentlemanHu/ComfyUI-SunoAI
Restart ComfyUI, and Manager (or pip install -r requirements.txt) will pull the deps: curl_cffi, python-dotenv, typer. No model files to download - this one is pure network.
Then grab the __session cookie for suno.com out of your browser's devtools and put it in a .env inside the pack folder:
SUNO_COOKIE=your_cookie_here
Where people get burned
- It's dead. The README banner isn't decorative. Suno rotates its auth and this wrapper hasn't seen a commit since December 2024 - it still targets the old chirp-v3-0 model. The community has moved on to credit-based third-party Suno APIs or just paying for Suno directly. Expect failures.
- Silent failure. The whole generation is wrapped in a
try/exceptthat prints "Error generating songs" to the console and returns four empty strings. The graph won't throw; your workflow just quietly receives blank URLs. Check the terminal. - Cookie rot. Session cookies expire, and hammering the unofficial endpoint from an "API client" is exactly what gets accounts flagged. Keep the cookie out of any workflow JSON you share - a saved workflow with a cookie in it is a credential leak waiting to happen. (The pack's other node,
SunoAIGeneratorNotSafe, makes that mistake in plain sight.)
If you just want to test whether cookie access still works for you, try SunoAIGeneratorNotSafe first - it takes the cookie as an input, no .env needed. If that returns empty strings, the answer is "no."
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Enter your song idea here | — |
| custom | BOOLEAN | false | — |
| tags | STRING | — | |
| instrumental | BOOLEAN | true | — |
| filename_prefix | STRING | SunoAI_ | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| MP3 URL 1 | STRING | — |
| MP3 URL 2 | STRING | — |
| Local Path 1 | STRING | — |
| Local Path 2 | STRING | — |