Referência da API do Suno v6 Mini
Duas músicas rápidas com vocal a partir de uma frase
Com uma única chave de API da PopNow você chama o Suno v6 Mini direto do seu código. Aqui estão os IDs de modelo a enviar, cada campo de entrada aceito, quantos créditos custa cada requisição e um exemplo que você cola no terminal e roda.
As descrições dos parâmetros vêm do schema de entrada do modelo e estão disponíveis só em inglês.
Resumo
- Desenvolvedor
- Suno
- Resultado
- Áudio
- A partir de
- 10.8 créditos por requisição ($0.108)
- IDs de modelo
1 crédito = US$ 0,01. Ao ser aceita, a tarefa reserva o valor máximo possível e, no fim, cobra o uso real, arredondado para cima em créditos inteiros; o restante é liberado. Tarefas que falham não são cobradas. Para saber o valor exato antes de rodar, chame POST /api/v1/jobs/quote.
Música
suno/v6-mini/text-to-audio
Preço
| Opção | Créditos (por requisição) | Dólares |
|---|---|---|
Padrão | 10.8 | $0.108 |
Parâmetros
| Campo | Tipo | Padrão | Valores aceitos | Para que serve |
|---|---|---|---|---|
promptObrigatório | string | — | até 3.000 caracteres | 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. |
lyricsOpcional | string | — | até 5.000 caracteres | Words to sing, sung in order. Section tags such as [Verse], [Chorus] and [Bridge] shape the song and are not sung. |
generate_lyricsOpcional | boolean | true | — | Let the model write the lyrics from the prompt. Only applies when lyrics is empty and instrumental is off. |
instrumentalOpcional | boolean | false | — | Generate music with no vocals. |
titleOpcional | string | — | até 80 caracteres | Song title (metadata, not sung). Applies with lyrics or an instrumental; otherwise the model names the song. |
negative_promptOpcional | string | — | até 500 caracteres | Styles or elements to keep out of the song. |
vocal_genderOpcional | string | — | female, male | Make a female or male lead vocal more likely. Applies with lyrics. |
style_weightOpcional | number | — | de 0 a 1 | How closely to follow the style in the prompt, from 0 to 1. |
weirdnessOpcional | number | — | de 0 a 1 | How experimental the song may get, from 0 (conventional) to 1 (unusual). |
audio_weightOpcional | number | — | de 0 a 1 | How strongly a persona's audio shapes the result, from 0 to 1. Songs with vocals only. |
varietyOpcional | integer | — | de 0 a 4 | How different the two versions are from each other: 0 off, 1 normal (the model default), 2 high, 3 extra, 4 max. |
persona_idOpcional | string | — | até 200 caracteres | ID of an existing Suno persona to reuse its style or voice. |
persona_modelOpcional | string | — | style_persona, voice_persona | Whether persona_id is a style persona or a voice persona. |
image_urlsOpcional | array<string (uri)> | — | até 5 itens | Up to 5 mood images (JPEG, PNG or WebP, 10 MB each). Only when the model writes the lyrics. |
reference_video_urlsOpcional | array<string (uri)> | — | até 1 itens | One reference video (MP4 or WebM, up to 100 MB and 241 seconds). Only when the model writes the lyrics. |
reference_audio_urlsOpcional | array<string (uri)> | — | até 1 itens | One reference audio clip (MP3 or WAV, 6 seconds to 30 minutes). Only when the model writes the lyrics. |
Exemplo de requisição
Esta requisição roda do jeito que está; os campos que você omitir usam o valor padrão. Antes, coloque sua chave em 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"
}
}'A resposta já traz um taskId. Busque o resultado com GET /api/v1/jobs/recordInfo ou inclua callBackUrl para ser avisado.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
