Génération musicale avec Suno AI

VérifiéSûr

Génère de la musique via l'API de Suno AI. Prend en charge les paroles personnalisées, les morceaux instrumentaux et les tags de style. Utile lorsque les utilisateurs souhaitent créer des chansons, mélodies ou pistes de manière programmatique.

Spar Skills Guide Bot
ContenuIntermédiaire
5002/06/2026
Claude Code
#music-generation#ai-songs#custom-lyrics#instrumental

Recommandé pour

Notre avis

Génère de la musique via l'API Suno AI à partir de descriptions textuelles, de paroles personnalisées ou de styles spécifiques.

Points forts

  • Création rapide de musiques originales à partir d'une simple description
  • Prise en charge des paroles personnalisées et des pistes instrumentales
  • Tags de style (genre, voix, humeur) pour affiner le rendu
  • Niveau gratuit disponible avec 50 crédits par jour

Limites

  • Le jeton d'authentification expire toutes les heures et doit être renouvelé manuellement
  • Nombre de chansons limité par jour (5 sur le plan gratuit)
  • Pas de contrôle fin sur le mixage ou le mastering
Quand l'utiliser

Quand vous avez besoin d'un brouillon ou d'une démo rapide de chanson, de musique de fond ou de jingle avec une ambiance ou des paroles spécifiques.

Quand l'éviter

Pour une production musicale professionnelle nécessitant un mixage précis, un mastering ou une composition itérative longue, ou quand une génération fiable hors ligne est requise.

Analyse de sécurité

Sûr
Score qualité90/100

The skill uses a Bash command to invoke a local Python script that interacts with Suno AI's API using a session cookie obtained manually by the user. There are no destructive commands, exfiltration, or obfuscation. The token handling is entirely local and standard for API usage. No elevated risk beyond normal API interaction.

Aucun point d'attention détecté

Exemples

Generate a pop song with custom lyrics
Create a pop song with the following lyrics about summer: 'Sun is high, sky is blue, feeling like there's nothing we can't do' – make it upbeat and include a female voice.
Generate an instrumental track
Generate an instrumental electronic track that sounds futuristic and energetic, suitable for a tech product launch.
Generate a song from description only
Make a song that sounds like a melancholic indie folk ballad, with male vocals and acoustic guitar.

name: suno-music description: Generate music using AI. Use when the user asks to create, generate, or make music, songs, audio, melodies, tracks, or beats. Supports custom lyrics, instrumental-only, and style tags. allowed-tools: Bash, Read, Write

Suno Music - AI Music Generation

Generate music using Suno AI's API.

Setup (One-Time)

  1. Sign in to suno.ai
  2. Open browser DevTools (F12) → Console tab
  3. Run: document.cookie
  4. Find the __session=eyJ... part (it's a long JWT token)
  5. Export it: export SUNO_COOKIE="__session=eyJ..."

Note: The __session token expires after ~1 hour. You'll need to refresh it periodically.

Usage

Run the generation script:

python3 ~/.claude/skills/suno-music/generate_music.py "your prompt here" [options]

Options

| Option | Description | Default | |--------|-------------|---------| | --custom | Treat prompt as lyrics (not description) | False | | --tags | Style/voice tags (e.g., "female voice, pop, upbeat") | None | | --title | Song title | None | | --instrumental | Generate instrumental only (no vocals) | False | | --output | Output directory path | ./generated_music | | --model | Model key (e.g., chirp-auk-turbo) | Default free model |

Examples

Generate from description

python3 ~/.claude/skills/suno-music/generate_music.py "an upbeat electronic track for a tech product demo"

Custom lyrics with style

python3 ~/.claude/skills/suno-music/generate_music.py "[Verse 1]
Walking through the morning light
Everything feels just right" --custom --tags "indie folk, acoustic guitar, male voice" --title "Morning Light"

Instrumental track

python3 ~/.claude/skills/suno-music/generate_music.py "epic orchestral trailer music with building tension" --instrumental

Output

Songs are saved with format: {timestamp}_{sanitized_title}_{n}.mp3

Example: 20260106_morning_light_1.mp3

Suno generates 2 variations per request by default.

Credits

  • Free tier: 50 credits/day (renews daily)
  • Each generation uses 10 credits (5 per song × 2 variations)
  • So you can generate 5 songs per day on the free tier

Check remaining credits:

python3 ~/.claude/skills/suno-music/generate_music.py --credits

Models

| Model | Key | Notes | |-------|-----|-------| | v4.5-all | chirp-auk-turbo | Best free model (default) | | v5 | chirp-crow | Pro only, beta | | v4.5+ | chirp-bluejay | Pro only | | v4 | chirp-v4 | Pro only |

Requirements

  • Python 3.x
  • requests library (usually pre-installed)
  • SUNO_COOKIE environment variable with __session token

Troubleshooting

"API Error: 401" - Token expired. Get a fresh __session token from the browser.

"API Error: 402" - Out of credits. Wait for daily refresh or upgrade.

Skills similaires