Suno 音楽
音楽生成
Suno 音楽生成。インスピレーション/カスタム歌詞モード、Max ティア対応
- テキスト説明またはカスタム歌詞から楽曲を生成(1回につき2候補)
- 非同期タスク。タスク ID で結果をポーリング
customがpromptの意味を決定:カスタム歌詞 vs インスピレーション説明
Authorizations
Authorizationstringヘッダー必須Bearer Token。API Key:API Key 管理ページ
Body
modelstringボディ必須固定値
"suno"custombooleanボディモード切替。デフォルト false
false:インスピレーションモード —gpt_description(またはprompt)に楽曲の説明true:カスタム歌詞モード —promptが歌詞本文、title/style/negative_tagsが有効
gpt_descriptionstringボディインスピレーションモードの楽曲説明。例:"雨の夜のカフェに合う lo-fi"。カスタムモードでは不要
promptstringボディカスタムモードの歌詞本文([Verse]/[Chorus] 構造タグ対応)
titlestringボディ曲タイトル(カスタムモード)
stylestringボディスタイルタグ(カスタムモード)。例:
"dreamy synthwave, female vocal"negative_tagsstringボディ避けたい要素(カスタムモード)
instrumentalbooleanボディインストゥルメンタル生成
versionstringボディエンジン版:
v6 / v6-wild / v6-minimax_modebooleanボディMax 品質ティア(2倍料金 $0.10)。
custom=true が必要persona_idstringボディ作成済みペルソナ ID。
custom_model_id と排他custom_model_idstringボディカスタム学習モデル ID。
version・persona_id と排他オプションの調整パラメータ
style_weight、weirdness、audio_weight、vocal_gender、auto_lyrics、variety はすべて省略可(省略時は上流の既定値)。
Response
task_idstringタスク ID(tsk_aud_ プレフィックス)。タスク状態照会 でポーリング
statusstringsubmitted / queued / in_progress完了後 result.music[] に 2 候補が返り、各 audio_url、image_url、title、tags、lyrics、duration を含みます。メディア URL は CDN にミラー済みです。
リクエスト例
curl --request POST \
--url https://toapis.com/v1/music/generations/generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "suno",
"gpt_description": "雨の夜のカフェに合う lo-fi ジャズ",
"instrumental": false,
"version": "v6"
}'import requests
resp = requests.post(
"https://toapis.com/v1/music/generations/generation",
headers={"Authorization": "Bearer <token>"},
json={
"model": "suno",
"custom": True,
"prompt": "[Verse]\nネオンが灯る\n[Chorus]\n夜明けまで駆け抜ける",
"title": "ネオンライド",
"style": "synthwave",
"max_mode": True
}
)
print(resp.json())const resp = await fetch("https://toapis.com/v1/music/generations/generation", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "suno",
gpt_description: "dreamy synthwave with female vocals",
version: "v6-wild"
})
});
console.log(await resp.json());