Suno v6 API 调用参考
用你的歌词或一句简短要求,生成带人声的完整歌曲
用一个 PopNow API 密钥,就能在自己的代码里调用 Suno v6。下面列出要填的调用名、这个型号接受的每个输入字段、每次请求花多少积分,以及一段可以直接粘进终端运行的请求。
参数说明直接取自型号的输入 schema,暂时只有英文。
一览
- 出品方
- Suno
- 产出
- 音频
- 起价
- 10.8 积分 每次请求 ($0.108)
- 一般耗时
- 约 48 秒
1 积分 = 0.01 美元。任务受理时先冻结可能的最高费用,完成后按实际用量结算、向上取整到整积分,多冻的退回;失败的任务不扣积分。想在运行前知道确切数字,先调 POST /api/v1/jobs/quote。
音乐
suno/v6/text-to-audio
价格
| 选项 | 积分 (每次请求) | 美元 |
|---|---|---|
默认 | 10.8 | $0.108 |
参数
| 字段 | 类型 | 默认值 | 取值范围 | 作用 |
|---|---|---|---|---|
prompt必填 | string | — | 最多 3000 个字符 | 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. |
lyrics可选 | string | — | 最多 5000 个字符 | Words to sing, sung in order. Section tags such as [Verse], [Chorus] and [Bridge] shape the song and are not sung. |
generate_lyrics可选 | boolean | true | — | Let the model write the lyrics from the prompt. Only applies when lyrics is empty and instrumental is off. |
instrumental可选 | boolean | false | — | Generate music with no vocals. |
title可选 | string | — | 最多 80 个字符 | Song title (metadata, not sung). Applies with lyrics or an instrumental; otherwise the model names the song. |
negative_prompt可选 | string | — | 最多 500 个字符 | Styles or elements to keep out of the song. |
vocal_gender可选 | string | — | female, male | Make a female or male lead vocal more likely. Applies with lyrics. |
style_weight可选 | number | — | 0 到 1 | How closely to follow the style in the prompt, from 0 to 1. |
weirdness可选 | number | — | 0 到 1 | How experimental the song may get, from 0 (conventional) to 1 (unusual). |
audio_weight可选 | number | — | 0 到 1 | How strongly a persona's audio shapes the result, from 0 to 1. Songs with vocals only. |
variety可选 | integer | — | 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_id可选 | string | — | 最多 200 个字符 | ID of an existing Suno persona to reuse its style or voice. |
persona_model可选 | string | — | style_persona, voice_persona | Whether persona_id is a style persona or a voice persona. |
image_urls可选 | array<string (uri)> | — | 最多 5 项 | Up to 5 mood images (JPEG, PNG or WebP, 10 MB each). Only when the model writes the lyrics. |
reference_video_urls可选 | array<string (uri)> | — | 最多 1 项 | One reference video (MP4 or WebM, up to 100 MB and 241 seconds). Only when the model writes the lyrics. |
reference_audio_urls可选 | array<string (uri)> | — | 最多 1 项 | One reference audio clip (MP3 or WAV, 6 seconds to 30 minutes). Only when the model writes the lyrics. |
请求示例
这段请求原样就能运行,没写的字段都用默认值。运行前先把密钥放进环境变量 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/text-to-audio",
"input": {
"prompt": "An upbeat indie pop song about a summer road trip, bright guitars, hand claps and a catchy whistled hook"
}
}'响应里会立刻带回 taskId。之后用 GET /api/v1/jobs/recordInfo 取结果,或者在请求里加上 callBackUrl 等通知。
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
