Suno Music Generation
Generate songs via a local gcui-art/suno-api server.
Setup
- Clone and install:
git clone https://github.com/gcui-art/suno-api && cd suno-api && npm install && npm run build - Create
.envwith your Suno cookie and optional 2Captcha key (see repo README) - Start server:
PORT=3100 npm start(or create a LaunchAgent/systemd service) - Verify:
curl http://localhost:3100/api/get_limit
Set SUNO_API_URL env var if not running on http://localhost:3100.
Quick Generate (simple mode)
For casual requests ("make a song about X") — Suno writes the lyrics:
scripts/suno.sh generate --prompt "DESCRIPTION" --wait
Custom Generate (full control)
For specific lyrics and style:
scripts/suno.sh custom --prompt "LYRICS" --style "GENRE TAGS" --title "TITLE" --wait
Add --instrumental for no vocals. Add --negative-tags "TAGS" to exclude styles.
Generate Lyrics First
When user provides a theme but not lyrics — generate, review, then create:
scripts/suno.sh lyrics --prompt "THEME"
Check Status / Credits
scripts/suno.sh status --ids "ID1,ID2"
scripts/suno.sh credits
Download Audio
scripts/suno.sh download --url "AUDIO_URL" --out "/path/to/file.mp3"
Workflow
- Vague idea →
generate(Suno writes lyrics from description) - Specific vision → write lyrics, then
customwith style tags and title - Review first →
lyricsto generate, show user, edit, thencustom - Always use
--wait— blocks until audio URLs are ready (~60-120s) - Each generation creates 2 song variations
- Download audio and send via message tool (as attachment)
- Songs appear in the user's Suno library/playlists
Style Tags Examples
pop, upbeat, happy, female vocalscountry, acoustic guitar, male vocals, storytellinghip hop, trap beats, autotuned vocalsclassical, orchestral, cinematicrock, electric guitar, energetic, anthemthrash metal, aggressive riffs, double bass drums, distorted guitarjazz, smooth, saxophone, loungelullaby, soft, gentle, music boxfolk, banjo, americana, warmedm, electronic, dance, synthr&b, soulful, smooth, groovy
Cookie Refresh
If auth errors occur, refresh the Suno cookie:
- Open suno.com/create in browser → DevTools (F12) → Network tab
- Refresh page → find request with
?__clerk_api_version - Copy the Cookie header value → update
.env→ restart server
Notes
- Default model: Suno v5 (
chirp-crow); override via--modelflag - Each generation uses credits (~10 per song pair)
- Audio files are MP3, typically 2-4 min
- 2Captcha key optional but recommended for long-term stability