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 |
|---|---|---|
Authorization | yes | 認証用ベアラートークン |
Content-Type | yes | application/json |
requestBody
リクエスト本文はインスピレーション モードまたはカスタム モードをサポートします
インスピレーションモード
テキストの説明から音楽を生成する
| paramName | paramType | required | description | example |
|---|---|---|---|---|
gpt_description_prompt | string | yes | 生成したい音楽のテキスト説明 | A upbeat pop song about summer vacation with catchy melody |
カスタムモード
カスタムの歌詞、スタイル、タイトルを使用して音楽を生成
| paramName | paramType | required | description | example |
|---|---|---|---|---|
prompt | string | yes | カスタム歌詞または詳細なプロンプト | Verse 1: Walking down the street, feeling so free... |
style | string | no | 音楽のスタイルまたはジャンル | pop, upbeat, electronic, 120 bpm |
title | string | no | 曲名 | Summer Dreams |
tags | string | no | 避けるべきネガティブタグ | sad, slow |
commonParams
| paramName | paramType | required | description | example |
|---|---|---|---|---|
model | string | no | 使用するAIモデル。 | chirp-v5-5 |
make_instrumental | boolean | no | ボーカルなしのインストゥルメンタル音楽を生成する | false |
gender | string | no | 声の性別の好み | female |
style_weight | number | no | スタイルへのこだわりの強さ | 0.65 |
weirdness_constraint | number | no | 創造的な逸脱を制御する | 0.65 |
audio_weight | number | no | オーディオ機能のバランスウェイト | 0.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
}'