パラメータ名 | 類型論 | 説明 | 備考 |
---|---|---|---|
config.mode | string | 設定モード | 選択可能値:"regular", "precede", "continuation"。 指示: |
- "precede":楽曲の前方拡張に使用され、song_section_start オーディオの展開位置をコントロールできます。 | |||
- "continuation":楽曲の後ろに展開する際には、 song_section_start パラメータと組み合わせることで、オーディオの展開位置をコントロールできます。 | |||
config.context_length | number | コンテキストの長さ | デフォルトは130。 |
config.source.song_id | string | 拡張された楽曲ID | 拡張を希望する楽曲ID。 |
song_section_start | number | 楽曲セグメント開始位置 | 範囲 0-1、デフォルト 0。 指示: |
- 楽曲全体からクリップを生成する際の開始位置を設定します。 | |||
- config.mode を "precede" にすると、前奏追加や前半部分の延長ができます。 | |||
- config.mode を "continuation" にすると、後半部分や終盤の延長ができます。 |
{
"gen_params": {
"prompt": "a song about the moon",
"lyrics": "",
"lyrics_type": "generate",
"bypass_prompt_optimization": false,
"seed": -1,
"song_section_start": 0,
"prompt_strength": 0.5,
"clarity_strength": 0.25,
"lyrics_strength": 0.5,
"generation_quality": 0.75,
"negative_prompt": "",
"model_type": "udio130-v1.5",
"config": {
"mode": "precede",
"context_length": 130,
"source": {
"source_type": "song",
"song_id": "xxxx-xxxx-xxxx"
}
}
}
}
curl --location --request POST 'https://api.302.ai/udio/generate-proxy' \
--header 'Authorization: Bearer sk-mfYQzy0XTFfz4P16vRE4gFrKK1Nly4TozsMqbbb9PSiJUvFO' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"gen_params": {
"prompt": "a song about the moon",
"lyrics": "",
"lyrics_type": "generate",
"bypass_prompt_optimization": false,
"seed": -1,
"song_section_start": 0,
"prompt_strength": 0.5,
"clarity_strength": 0.25,
"lyrics_strength": 0.5,
"generation_quality": 0.75,
"negative_prompt": "",
"model_type": "udio130-v1.5",
"config": {
"mode": "precede",
"context_length": 130,
"source": {
"source_type": "song",
"song_id": "xxxx-xxxx-xxxx"
}
}
}
}'
{
"code": "success",
"message": "",
"data": "69c61512-278e-4ff4-b6ea-f3b278329b04"
}