parameter name | typology | description | note |
---|---|---|---|
config.mode | string | Configuration Mode | selectable value:"regular", "precede", "continuation"。 clarification: |
- "precede":Used to expand the audio at the beginning of the song,,in coordination with the song_section_start parameter to precisely control the audio expansion position. | |||
- "continuation":Used to add audio expansion after the song, in coordination with the song_section_start parameter to control the precise position of the expansion. | |||
config.context_length | number | Context length | The default is 130. |
config.source.song_id | string | Extended Song ID | The song ID you want to extend。 |
song_section_start | number | Song clip start position | Range 0-1, default 0. clarification: |
- This parameter is used to specify the starting position for generating clips within a full song. | |||
- When config.mode is set to "precede", this parameter can be used to add a prelude or extend the first half of the audio track. | |||
- When config.mode is set to "continuation" , this parameter can be used to expand the second half or the closing section of the audio track. |
{
"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-jls4AaVBGoe1GwZD64qZA1qyKTN1MPHa4NmvH1cT68z7K1Zz' \
--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"
}