promptstring必須v6 の編曲をテンポ、楽器、声質で指定します。歌詞指定または instrumental の曲調説明は 1,000 文字、自動作詞の楽曲案は 3,000 文字までです。v6 の依頼料金に含まれます。
- デフォルト値
- 指定なし
- 制約
- minLength:1maxLength:3000
例は、選択中のエンドポイントの公開パラメーター定義から作っています。API キーとサンプル素材を差し替えて、ご自身のサーバーから送信してください。
SDK・連携https://api.spicyapi.ai/api/v1/jobs/createTaskAPI キーはサーバーの環境変数 SPICY_API_KEY に保存します。Bearer 認証を使用し、JSON リクエストには Content-Type: application/json を指定してください。
Authorization: Bearer $SPICY_API_KEY# Generate the idempotency key once; reuse it when retrying after a lost response.
export SPICY_IDEMPOTENCY_KEY="${SPICY_IDEMPOTENCY_KEY:-$(uuidgen)}"
curl -X POST https://api.spicyapi.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $SPICY_IDEMPOTENCY_KEY" \
-d '{
"model": "suno/v6/text-to-audio",
"input": {
"prompt": "Calm ambient pads with a slow rising motif"
}
}'
# Copy data.taskId from the response into TASK_ID, then poll the status.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.spicyapi.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $SPICY_API_KEY"このモデルの入力スキーマから生成した例です。API はどのリクエストも、同じスキーマで検証します。
これらのフィールドは、リクエスト本文の input オブジェクトに指定します。名前と型は API と一致します。デフォルト値の指定がない項目に、デフォルト値があると想定しないでください。
promptstring必須v6 の編曲をテンポ、楽器、声質で指定します。歌詞指定または instrumental の曲調説明は 1,000 文字、自動作詞の楽曲案は 3,000 文字までです。v6 の依頼料金に含まれます。
reference_audio_urlsarray<string>任意v6 の参考音声を 1 件送れます。権利を確認した MP3 または WAV を使い、6 秒〜30 分、500 MB 以内に収めます。v6 の参照メディアには自動作詞が必要です。lyrics を空にし、instrumental をオフ、generate_lyrics を有効にします。v6 の依頼料金に含まれます。
reference_video_urlsarray<string>任意v6 の楽曲イメージを動画で伝えます。参照は MP4 または WebM の 1 件で、容量は最大 100 MB、長さは最大 241 秒です。v6 の参照メディアには自動作詞が必要です。lyrics を空にし、instrumental をオフ、generate_lyrics を有効にします。v6 の依頼料金に含まれます。
image_urlsarray<string>任意v6 の楽曲イメージを画像で伝えられます。JPEG、PNG、WebP を最大 5 枚、各 10 MB まで指定できます。v6 の参照メディアには自動作詞が必要です。lyrics を空にし、instrumental をオフ、generate_lyrics を有効にします。v6 の依頼料金に含まれます。
persona_modelstring任意v6 で曲調を引き継ぐ場合は style_persona、声を引き継ぐ場合は voice_persona を選び、対応する persona_id を送ります。v6 の詳細制御は歌詞を渡す場合か instrumental に限ります。v6 の依頼料金に含まれます。
"style_persona""voice_persona"persona_idstring任意v6 の歌唱に使う保存済み Suno ペルソナの ID です。声と曲調のどちらを引き継ぐかは persona_model で指定します。v6 の詳細制御は歌詞を渡す場合か instrumental に限ります。v6 の依頼料金に含まれます。
varietyinteger任意v6 の曲調説明の変化量を整数 0〜4 で指定します。初期値は 1 で、0 なら元のタグを保つという Suno の説明は個別に検証していません。v6 の詳細制御は歌詞を渡す場合か instrumental に限ります。v6 の依頼料金に含まれます。
audio_weightnumber任意v6 の歌唱に対するペルソナ音声の影響を設定します。0〜1 を 0.01 刻みで指定でき、インストゥルメンタルには対応しません。v6 の詳細制御は歌詞を渡す場合か instrumental に限ります。v6 の依頼料金に含まれます。
weirdnessnumber任意v6 の編曲を定型寄りから冒険的な方向へ調整します。値は 0〜1、変更幅は 0.01 です。v6 の詳細制御は歌詞を渡す場合か instrumental に限ります。v6 の依頼料金に含まれます。
style_weightnumber任意v6 の編曲を指定したスタイルに近づける強さです。設定範囲は 0〜1、刻み幅は 0.01 です。v6 の詳細制御は歌詞を渡す場合か instrumental に限ります。v6 の依頼料金に含まれます。
vocal_genderstring任意v6 のリードボーカルに female または male を希望できます。この指定が守られる割合は実測していません。v6 の詳細制御は歌詞を渡す場合か instrumental に限ります。v6 の依頼料金に含まれます。
"female""male"negative_promptstring任意v6 の編曲で避けたい要素を任意で指定します。歌詞に混ぜず、この欄に 500 文字以内でまとめます。v6 の依頼料金に含まれます。
titlestring任意v6 の曲名メタデータは 80 文字までです。歌詞指定または instrumental で利用でき、自動作詞ではモデルが命名します。v6 の詳細制御は歌詞を渡す場合か instrumental に限ります。v6 の依頼料金に含まれます。
instrumentalboolean任意v6 にインストゥルメンタルを依頼する場合は true にします。通常は false で、歌声なしの場合は prompt を 1,000 文字以内に収めます。v6 の依頼料金に含まれます。
generate_lyricsboolean任意v6 に説明から作詞させる場合は初期値の true を使います。既存の歌詞を送る場合や instrumental を有効にした場合は作詞しません。v6 の依頼料金に含まれます。
lyricsstring任意v6 に渡す完成歌詞は 5,000 文字までです。SpicyAPI の実測では行順が保たれ、独立した行の構成タグは歌われませんでした。v6 の依頼料金に含まれます。
{
"additionalProperties": false,
"properties": {
"audio_weight": {
"description": "How strongly a persona's audio shapes the result, from 0 to 1. Songs with vocals only.",
"maximum": 1,
"minimum": 0,
"multipleOf": 0.01,
"type": "number",
"x-ui": {
"advanced": true,
"order": 43,
"step": 0.01,
"widget": "slider"
}
},
"generate_lyrics": {
"default": true,
"description": "Let the model write the lyrics from the prompt. Only applies when lyrics is empty and instrumental is off.",
"type": "boolean",
"x-ui": {
"advanced": false,
"order": 80,
"widget": "switch"
}
},
"image_urls": {
"description": "Up to 5 mood images (JPEG, PNG or WebP, 10 MB each). Only when the model writes the lyrics.",
"items": {
"contentMediaType": [
"image/jpeg",
"image/png",
"image/webp",
"image/gif"
],
"format": "uri",
"type": "string"
},
"maxItems": 5,
"type": "array",
"x-ui": {
"accept": [
"image/jpeg",
"image/png",
"image/webp"
],
"advanced": true,
"order": 20,
"widget": "multi-upload"
}
},
"instrumental": {
"default": false,
"description": "Generate music with no vocals.",
"type": "boolean",
"x-ui": {
"advanced": false,
"order": 70,
"widget": "switch"
}
},
"lyrics": {
"description": "Words to sing, sung in order. Section tags such as [Verse], [Chorus] and [Bridge] shape the song and are not sung.",
"maxLength": 5000,
"minLength": 1,
"type": "string",
"x-ui": {
"advanced": false,
"order": 90,
"rows": 10,
"widget": "textarea"
}
},
"negative_prompt": {
"description": "Styles or elements to keep out of the song.",
"maxLength": 500,
"minLength": 1,
"type": "string",
"x-ui": {
"advanced": true,
"order": 55,
"rows": 2,
"widget": "textarea"
}
},
"persona_id": {
"description": "ID of an existing Suno persona to reuse its style or voice.",
"maxLength": 200,
"minLength": 1,
"type": "string",
"x-ui": {
"advanced": true,
"order": 30,
"widget": "text"
}
},
"persona_model": {
"description": "Whether persona_id is a style persona or a voice persona.",
"enum": [
"style_persona",
"voice_persona"
],
"type": "string",
"x-ui": {
"advanced": true,
"enum_labels": {
"style_persona": "Style persona",
"voice_persona": "Voice persona"
},
"order": 29,
"widget": "select"
}
},
"prompt": {
"description": "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.",
"maxLength": 3000,
"minLength": 1,
"type": "string",
"x-ui": {
"order": 100,
"primary": true,
"rows": 4,
"widget": "textarea"
}
},
"reference_audio_urls": {
"description": "One reference audio clip (MP3 or WAV, 6 seconds to 30 minutes). Only when the model writes the lyrics.",
"items": {
"contentMediaType": [
"audio/mpeg",
"audio/wav"
],
"format": "uri",
"type": "string"
},
"maxItems": 1,
"type": "array",
"x-ui": {
"accept": [
"audio/mpeg",
"audio/wav"
],
"advanced": true,
"order": 18,
"widget": "multi-upload"
}
},
"reference_video_urls": {
"description": "One reference video (MP4 or WebM, up to 100 MB and 241 seconds). Only when the model writes the lyrics.",
"items": {
"contentMediaType": [
"video/mp4",
"video/webm",
"video/quicktime"
],
"format": "uri",
"type": "string"
},
"maxItems": 1,
"type": "array",
"x-ui": {
"accept": [
"video/mp4",
"video/webm"
],
"advanced": true,
"order": 19,
"widget": "multi-upload"
}
},
"style_weight": {
"description": "How closely to follow the style in the prompt, from 0 to 1.",
"maximum": 1,
"minimum": 0,
"multipleOf": 0.01,
"type": "number",
"x-ui": {
"advanced": true,
"order": 45,
"step": 0.01,
"widget": "slider"
}
},
"title": {
"description": "Song title (metadata, not sung). Applies with lyrics or an instrumental; otherwise the model names the song.",
"maxLength": 80,
"minLength": 1,
"type": "string",
"x-ui": {
"advanced": true,
"order": 60,
"widget": "text"
}
},
"variety": {
"description": "How different the two versions are from each other: 0 off, 1 normal (the model default), 2 high, 3 extra, 4 max.",
"maximum": 4,
"minimum": 0,
"type": "integer",
"x-ui": {
"advanced": true,
"order": 42,
"step": 1,
"widget": "slider"
}
},
"vocal_gender": {
"description": "Make a female or male lead vocal more likely. Applies with lyrics.",
"enum": [
"female",
"male"
],
"type": "string",
"x-ui": {
"advanced": true,
"enum_labels": {
"female": "Female",
"male": "Male"
},
"order": 50,
"widget": "select"
}
},
"weirdness": {
"description": "How experimental the song may get, from 0 (conventional) to 1 (unusual).",
"maximum": 1,
"minimum": 0,
"multipleOf": 0.01,
"type": "number",
"x-ui": {
"advanced": true,
"order": 44,
"step": 0.01,
"widget": "slider"
}
}
},
"required": [
"prompt"
],
"type": "object",
"x-pricing": {
"billingMode": "per_unit",
"variantFields": []
}
}HTTP 202 はタスクを受け付けたという意味で、生成が終わったという意味ではありません。返ってきた taskId を保存し、そのタスクの状態を問い合わせてください。結果を待っている間に、同じ内容でタスクを作り直さないでください。
HTTP/1.1 202 Accepted
Location: /api/v1/jobs/recordInfo?taskId=job_01k3m8x9q2z4v7n5p6r8s0t1w3
{
"code": 200,
"msg": "success",
"request_id": "req_example_create",
"data": {
"taskId": "job_01k3m8x9q2z4v7n5p6r8s0t1w3",
"state": "queued",
"estimatedCost": "0.750000"
}
}受理レスポンスには今回の概算料金が含まれるため、アプリのタスク履歴と請求画面に同じ金額を表示できます。
curl --get "https://api.spicyapi.ai/api/v1/jobs/recordInfo" \
--data-urlencode "taskId=$TASK_ID" \
-H "Authorization: Bearer $SPICY_API_KEY"ポーリングは約 2 秒間隔から始め、徐々に間隔を延ばします。終了状態になったら止めてください。通信が切れたときも、元の taskId で状態を確認します。作成をやり直すときは、同じ冪等キーと同じ本文をそのまま使い回してください。
import { verifyWebhook } from "@spicyapi/sdk";
// express.raw keeps the bytes we signed; express.json never matches.
app.post("/hooks/spicy", express.raw({ type: "application/json" }), (req, res) => {
const { payload } = verifyWebhook({
rawBody: req.body,
timestamp: req.header("X-Webhook-Timestamp"),
signature: req.header("X-Webhook-Signature"),
payloadVersion: Number(req.header("X-Webhook-Payload-Version")),
secret: process.env.SPICY_WEBHOOK_SECRET,
});
res.status(200).end();
void handleFinishedTask(payload);
});タスク作成時に callBackUrl を渡せば、完了したレコードが POST で届きます——ポーリングは一切不要です。配信には毎回 X-Webhook-Timestamp、X-Webhook-Signature、X-Webhook-Payload-Version が付きます。署名は taskId.timestamp.sha256(body) に対する HMAC-SHA256(base64)なので、生のバイト列で検証してください。JSON を解析して再度文字列化するとバイト列が変わり、検証は必ず失敗します。失敗した配信は再送されるため同じ taskId が二度届くことがあります。ハンドラーは冪等に。まず 2xx を返し、処理はその後で——応答が遅いと配信失敗として扱われます。
output を読むのは、state が succeeded のときだけにしてください。失敗したときは errorCode、errorMessage、request_id を手がかりに調べます。例に出ている料金や状態は、実際の請求ではありません。
{
"code": 200,
"msg": "success",
"request_id": "req_example_record",
"data": {
"taskId": "job_01k3m8x9q2z4v7n5p6r8s0t1w3",
"model": "suno/v6/text-to-audio",
"state": "succeeded",
"output": {
"assets": [
{
"key": "tasks/2026/08/28/job_01k3m8x9q2z4v7n5p6r8s0t1w3/3f7a1c9e5b2d48f0a6c1e3d5b7f9a1c3.mp3",
"mime": "audio/mpeg",
"url": "https://example.r2.cloudflarestorage.com/results/job_01k3m8x9q2z4v7n5p6r8s0t1w3/result.mp3?X-Amz-Signature=SIGNATURE_FROM_RESPONSE",
"expiresAt": "2026-08-28T12:20:08.000Z"
}
]
},
"cost": "0.750000",
"settled": true,
"createdAt": "2026-08-28T12:00:00Z",
"completedAt": "2026-08-28T12:00:30Z"
}
}利用可能なファイルは assets[].url からそのまま開くか、ダウンロードできます。API の Authorization ヘッダーは不要です。署名付き URL は expiresAt で失効しますが、保存期間内であればタスクを再取得することで更新できます。処理中または利用できないファイルに URL はありません。署名付き URL は非公開情報として扱ってください。
アプリ、ターミナル、AI アシスタント、ビジュアルワークフローで SpicyAPI を活用。接続ガイドを選んでください。
上のコードを書く必要はありません。MCP サーバーを 1 回接続すれば、MCP に対応するエージェント(Claude Code、Codex、Cursor、Windsurf、VS Code、Gemini CLI、Cline、LibreChat)がこのモデルを名前で実行できます。シェルから 1 つのコマンドで実行することもできます。
Use suno/v6/text-to-audio to generate a portrait of a dancer under neon light, and save it to ./out/.
エージェントは公開カタログからモデルを引き、ローカルファイルを代わりにアップロードし、正確な見積もりと上限額を示して確認を待ちます。承認するまで課金は発生しません。
claude mcp add spicyapi -e SPICY_API_KEY=$SPICY_API_KEY \
-- npx --yes --package=@spicyapi/mcp spicyapi-mcp
npx skills add spicyapi-ai/spicy-skill1 行目でツールを、2 行目で Skill を渡します。Skill は使い方の取り決めです——課金の前に見積もりを取り、ローカルファイルはバイト列を貼らずにアップロードし、完成した成果物の URL を推測せずに読む。ほかのクライアントも同じサーバーをそれぞれの設定ファイルから使います。開発者向けページをご覧ください。
npx @spicyapi/cli tasks create --model suno/v6/text-to-audio \
--input-json '{"prompt":"Calm ambient pads with a slow rising motif"}' \
--wait入力は上の例と同じ、このエンドポイント固有のスキーマに従います。--wait はタスクの完了までポーリングして結果を表示します。CI では --yes を追加すると確認を省略できます。先に SPICY_API_KEY を設定してください。API、CLI、MCP サーバーで同じキーを使えます。
npx @spicyapi/cli tasks create --model suno/v6/text-to-audio \
--input-json '{…}' --retention 1h --wait
npx @spicyapi/cli tasks get $TASK_ID # read back the retention that applied--retention は保持期間を短くするだけです——30m、1h、7d、あるいは 0 なら終了と同時に削除。実際に効くのはリクエスト・アカウント設定・プラットフォーム上限のうち最も短い値なので、指定した数値が通った前提で進めず、タスクレコードから読み戻してください。アカウントの許容より長い値を渡しても何も起きません。
ComfyUI Manager か下のコマンドで SpicyAPI ノードをインストールしたら、キャンバスで Suno v6 · Text to Music を検索してください。このノードにはこのページと同じオプションがあり、実行前に価格が表示されます。
cd ComfyUI/custom_nodes
git clone https://github.com/spicyapi-ai/comfyui-spicyapi埋め込みパネルはこのページと同じスキーマを参照するため、API 仕様とのずれを防げます。ドキュメント内の検索対象にする場合は、/api/embed/models/ の JSON を取得して描画してください。
<iframe src="https://spicyapi.ai/embed/ja/models/suno-v6/api?model=suno%2Fv6%2Ftext-to-audio" width="100%" height="560" loading="lazy" title="リクエスト例" style="border:1px solid rgba(0,0,0,.12)"></iframe>