Suno 参考オーディオアップロード API 連携説明

SUNO では、参考オーディオをアップロードして二次創作を行うことができます。本ドキュメントでは、関連 API の連携方法について説明します。

通常のアップロードには audio_url のみが必要です。これは公開アクセス可能なオーディオ CDN アドレスです。mode のデフォルト値は standard であるため、既存の呼び出しを変更する必要はありません。通常のアップロードが成功すると 0.06 Credits を消費します。アップロードに失敗した場合は課金されません。

ここで入力する audio_url は https://cdn.acedata.cloud/suno_demo.mp3 であり、公開アクセス可能な CDN アドレスです。

curl -X POST 'https://api.01ai.cloud/suno/upload' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
  "audio_url": "https://cdn.acedata.cloud/suno_demo.mp3"
}'

結果は以下のとおりです。

{
    "success": true,
    "task_id": "058f8450-3df4-4f8b-8b64-ebc2e59ed3bc",
    "data": {
        "audio_id": "00135f7d-cda1-4d70-b007-779f07143586",
        "lyric": "[Intro]\nHa-ha-ha-ha-ha-ha\n[Verse 1]\nCandy skies are dripping blue\nStuck in world of chewed up glue\nThe sun's a lollipop melting slow\nDripped in sugar on the ground below\nOh-oh\n[Chorus]\nIt's a bubblegum catastrophe\nSticky mess can't set it free\nPop it once it multiplies\nCandy chaos in disguise\nIt's a bubblegum catastrophe\nSticky mess can't set it free\nPop it once it multiplies\nCandy chaos in disguise\nHa-ha-ha-ha-ha hey\nHa-ha-ha-ha-ha hey\nHa-ha-ha-ha-ha hey\nHa-ha-ha-ha-ha hey\nCandy chaos in disguise\n[Verse 2]\nJellybean mountains crumble fast\nRainbows made of soda blast\nEvery step's a gummy bear trap\nMy sugar rush is taking a nap\nOh-oh\n[Bridge]\nChew it up (ha-ha-ha-ha)\nSpit it out (ha-ha-ha-ha)\nRound and round (ha-ha-ha-ha)\nWithout a doubt (ha-ha-ha-ha)\n[Chorus]\nIt's a bubblegum catastrophe\nSticky mess can't set it free\nPop it once it multiplies\nCandy chaos in disguise\nIt's a bubblegum catastrophe\nSticky mess can't set it free\nPop it once it multiplies\nCandy chaos in disguise\nHa-ha-ha-ha-ha hey\nHa-ha-ha-ha-ha hey\nHa-ha-ha-ha-ha hey\nHa-ha-ha-ha-ha hey\n[Outro]\nCotton candy clouds collapse\nChocolate rivers running laps\nEverywhere's a sugar flood\nMy shoes are drowning caramel\nHa-ha-ha-ha-ha hey\nHa-ha-ha-ha-ha hey\nHa-ha-ha-ha-ha hey\nHa-ha-ha-ha-ha hey\nIt's a bubblegum catastrophe\nSticky mess can't set it free\nPop it once it multiplies\nCandy chaos in disguise\nIt's a bubblegum catastrophe\nSticky mess can't set it free\nPop it once it multiplies\nCandy chaos in disguise",
        "style": "Upbeat bubblegum pop track with a high-energy electronic production style. The song features a bright, processed female vocal with a youthful and energetic tone, often layered with harmonies and occasional pitch-shifted ad-libs. The instrumentation is dominated by bouncy, staccato synthesizer chords, a driving four-on-the-floor electronic drum beat with crisp claps on the backbeat, and a prominent, melodic bassline. The tempo is approximately 128 BPM in a major key, utilizing a standard pop chord progression of I-V-vi-IV. Production elements include heavy use of sidechain compression, vocal chops, and shimmering sound effects that contribute to a sugary, hyper-pop aesthetic. The structure follows a verse-chorus-verse-chorus-bridge-chorus format with a high-energy build-up leading into the explosive, hook-driven choruses.",
        "image_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-001",
        "image_large_url": "https://cdn.acedata.cloud/e724d7f13d.png?example=image-002",
        "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
        "title": "up-d6c3970d-6db1-41e3-b966-90539c93678a",
        "duration": 131.16
    }
}

ご覧のとおり、data は常にオブジェクトであり、audio_id はアップロード後の楽曲 ID です。lyric、style、duration、タイトル、メディア URL などの分析結果はオプションフィールドであり、詳細は返却内容に準じます。

アップロード結果でカバー画像が提供される場合、image_url と image_large_url はそれぞれ通常カバーと高解像度カバーの元アドレスを返します。

楽曲 ID を取得した後は、Suno Audios Generation API を通じて、upload_extend、upload_cover、または区間サンプリングなど、audio_id を必要とする操作を呼び出すことができます。Inspo インスピレーション作曲機能を使用して、1~4 本の完全な参考オーディオに基づいて新しい音楽を作成する場合は、直接 action=inspo を呼び出し、元の公開オーディオ URL のリストを渡してください。サービスがアップロードと分析を自動的に完了するため、クライアント側でオーディオ metadata を組み立てる必要はありません。

プライベート音声用のカバー原曲をアップロードする

/suno/voices で作成したプライベート音声でカバーを作成する場合、通常のアップロードリクエストでその音声の persona_id を渡し、原曲と音声を関連付けます。

{
  "audio_url": "https://cdn.acedata.cloud/suno_demo.mp3",
  "mode": "standard",
  "persona_id": "<声音创建接口返回的 persona_id>"
}

アップロードに成功した後、返された data.audio_id を使用して /suno/audios を呼び出し、action: "upload_cover" を設定して同じ persona_id を渡します。以前にその音声と関連付けられていないオーディオ ID を引き続き使用しないでください。

persona_id は通常のアップロードでのみサポートされ、mode: "enhanced" と同時に使用することはできません。vocal_gender を追加で指定する必要はありません。性別の設定は音声 ID の代わりにはなりません。音声の作成、原曲のアップロード、カバーの作成には、同じサービスチャネルを使用する必要があります。

拡張アップロードモード

audio_url は入力アドレスであり、オーディオ処理フローに直接渡されます。最終メディア永続化サービスによって事前に転送・保存されることはありません。タスク処理中に公開アクセス可能であることを確認してください。

通常のアップロードで、所有している、または使用許可を得ているオーディオを処理できない場合は、mode を enhanced に設定できます。このモードでは、1~100 文字の name も必須であり、公開アクセス可能な HTTPS audio_url を使用する必要があります。

拡張アップロードは固定で非同期処理を採用しており、通常は 2 分以上かかります。処理に成功すると 1.87 Credits を消費します。処理に失敗した場合は課金されません。

curl -X POST 'https://api.01ai.cloud/suno/upload' \
  -H 'authorization: Bearer {token}' \
  -H 'content-type: application/json' \
  -d '{
    "audio_url": "https://cdn.acedata.cloud/suno_demo.mp3",
    "mode": "enhanced",
    "name": "My Song"
  }'

インターフェースは直ちに task_id と trace_id を返します。Suno Tasks API を使用してタスクを照会し、成功後に response.data.audio_id からアップロード後の音声 ID を読み取ります。HTTPS の callback_url を提供して終端状態を受信することもできます。

強化アップロードで得られた audio_id は Cover、Samples、および Mashup に使用できます。伴奏と MIDI の抽出、全トラック分離、およびボーカル/伴奏分離は、依然として音声が属するアカウントによる制限を受ける可能性があります。記載されていない操作については、アカウントをまたいだ使用がサポートされる保証はありません。音声が短いほど、通常は処理の成功率が高くなります。