POST
/v2/generate音楽APIの生成
AI 音楽作成用のデフォルトの Music Generate エンドポイント。インスピレーションモードとカスタムモードの両方をサポートします。
POST
https://udioapi.pro/api/v2/generatetips
デフォルトのエンドポイント: 標準生成には /v2/generate を使用します。
モード: インスピレーション モードでは gpt_description_prompt を使用します。カスタム モードでは、prompt、style、title を使用します。
モデル選択: chirp-v4-0、chirp-v4-5、chirp-v4-5-plus、chirp-v5、chirp-v5-5 を選択できます。モデル紹介とクレジット消費をご確認ください。
次のステップ: このエンドポイントを呼び出した後、音楽生成タスクステータス API を使用してタスクの進行状況をポーリングし、オーディオ URL を取得します。
requestHeaders
| name | required | description |
|---|---|---|
nameAuthorization | requiredyes | description認証用ベアラートークン |
nameContent-Type | requiredyes | descriptionapplication/json |
requestBody
リクエスト本文はインスピレーション モードまたはカスタム モードをサポートします
インスピレーションモード
テキストの説明から音楽を生成する
| paramName | paramType | required | description | example |
|---|---|---|---|---|
paramNamegpt_description_prompt | paramTypestring | requiredyes | description生成したい音楽のテキスト説明 | exampleA upbeat pop song about summer vacation with catchy melody |
カスタムモード
カスタムの歌詞、スタイル、タイトルを使用して音楽を生成
| paramName | paramType | required | description | example |
|---|---|---|---|---|
paramNameprompt | paramTypestring | requiredyes | descriptionカスタム歌詞または詳細なプロンプト | exampleVerse 1: Walking down the street, feeling so free... |
paramNamestyle | paramTypestring | requiredno | description音楽のスタイルまたはジャンル | examplepop, upbeat, electronic, 120 bpm |
paramNametitle | paramTypestring | requiredno | description曲名 | exampleSummer Dreams |
paramNametags | paramTypestring | requiredno | description避けるべきネガティブタグ | examplesad, slow |
commonParams
| paramName | paramType | required | description | example |
|---|---|---|---|---|
paramNamemodel | paramTypestring | requiredno | description使用するAIモデル。 | examplechirp-v5-5 |
paramNamemake_instrumental | paramTypeboolean | requiredno | descriptionボーカルなしのインストゥルメンタル音楽を生成する | examplefalse |
paramNamegender | paramTypestring | requiredno | description声の性別の好み | examplefemale |
paramNamestyle_weight | paramTypenumber | requiredno | descriptionスタイルへのこだわりの強さ | example0.65 |
paramNameweirdness_constraint | paramTypenumber | requiredno | description創造的な逸脱を制御する | example0.65 |
paramNameaudio_weight | paramTypenumber | requiredno | descriptionオーディオ機能のバランスウェイト | example0.65 |
responses
json
{
"code": 200,
"message": "success",
"workId": "gen2abc123def456bksv",
"data": {
"task_id": "gen2abc123def456bksv"
}
}codeExamples
curl
curl -X POST "https://udioapi.pro/api/v2/generate" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "chirp-v4-5",
"prompt": "Verse 1: Walking down the street, feeling so free\nChorus: Summer dreams are calling me",
"style": "pop, upbeat, electronic, 120 bpm",
"title": "Summer Dreams",
"make_instrumental": false,
"gender": "female",
"style_weight": 0.65,
"weirdness_constraint": 0.65,
"audio_weight": 0.65
}'