Référence API de Suno v6 Mini
Deux chansons rapides avec voix à partir d’une phrase
Une seule clé API PopNow suffit pour appeler Suno v6 Mini depuis votre code. Vous trouverez ici les identifiants de modèle à envoyer, chaque champ d’entrée accepté, le coût d’une requête en crédits et une requête à coller telle quelle dans un terminal.
Les descriptions des paramètres proviennent du schéma d’entrée du modèle et ne sont disponibles qu’en anglais.
En bref
- Éditeur
- Suno
- Résultat
- Audio
- À partir de
- 10.8 crédits par requête ($0.108)
- Identifiants de modèle
1 crédit = 0,01 $. À l’acceptation, une tâche réserve le montant maximal possible, puis facture la consommation réelle à la fin, arrondie au crédit supérieur ; le reste est libéré. Une tâche en échec n’est pas facturée. Pour connaître le montant exact avant de lancer, appelez POST /api/v1/jobs/quote.
Musique
suno/v6-mini/text-to-audio
Prix
| Option | Crédits (par requête) | Dollars US |
|---|---|---|
Par défaut | 10.8 | $0.108 |
Paramètres
| Champ | Type | Valeur par défaut | Valeurs admises | Rôle |
|---|---|---|---|---|
promptObligatoire | string | — | jusqu’à 3 000 caractères | Describe the song: genre, mood, tempo, instruments and voice. With lyrics or an instrumental this is the style (up to 1,000 characters); with no lyrics the model writes the words from it. |
lyricsFacultatif | string | — | jusqu’à 5 000 caractères | Words to sing, sung in order. Section tags such as [Verse], [Chorus] and [Bridge] shape the song and are not sung. |
generate_lyricsFacultatif | boolean | true | — | Let the model write the lyrics from the prompt. Only applies when lyrics is empty and instrumental is off. |
instrumentalFacultatif | boolean | false | — | Generate music with no vocals. |
titleFacultatif | string | — | jusqu’à 80 caractères | Song title (metadata, not sung). Applies with lyrics or an instrumental; otherwise the model names the song. |
negative_promptFacultatif | string | — | jusqu’à 500 caractères | Styles or elements to keep out of the song. |
vocal_genderFacultatif | string | — | female, male | Make a female or male lead vocal more likely. Applies with lyrics. |
style_weightFacultatif | number | — | de 0 à 1 | How closely to follow the style in the prompt, from 0 to 1. |
weirdnessFacultatif | number | — | de 0 à 1 | How experimental the song may get, from 0 (conventional) to 1 (unusual). |
audio_weightFacultatif | number | — | de 0 à 1 | How strongly a persona's audio shapes the result, from 0 to 1. Songs with vocals only. |
varietyFacultatif | integer | — | de 0 à 4 | How different the two versions are from each other: 0 off, 1 normal (the model default), 2 high, 3 extra, 4 max. |
persona_idFacultatif | string | — | jusqu’à 200 caractères | ID of an existing Suno persona to reuse its style or voice. |
persona_modelFacultatif | string | — | style_persona, voice_persona | Whether persona_id is a style persona or a voice persona. |
image_urlsFacultatif | array<string (uri)> | — | jusqu’à 5 éléments | Up to 5 mood images (JPEG, PNG or WebP, 10 MB each). Only when the model writes the lyrics. |
reference_video_urlsFacultatif | array<string (uri)> | — | jusqu’à 1 éléments | One reference video (MP4 or WebM, up to 100 MB and 241 seconds). Only when the model writes the lyrics. |
reference_audio_urlsFacultatif | array<string (uri)> | — | jusqu’à 1 éléments | One reference audio clip (MP3 or WAV, 6 seconds to 30 minutes). Only when the model writes the lyrics. |
Exemple de requête
Cette requête fonctionne telle quelle ; les champs omis gardent leur valeur par défaut. Placez d’abord votre clé dans POPNOW_API_KEY.
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "suno/v6-mini/text-to-audio",
"input": {
"prompt": "An upbeat indie pop song about a summer road trip, bright guitars, hand claps and a catchy whistled hook"
}
}'La réponse contient tout de suite un taskId. Récupérez le résultat avec GET /api/v1/jobs/recordInfo, ou ajoutez callBackUrl pour être prévenu.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
