Appearance
🎧 音乐模型 Udio
- 2024.11.12 本站已经支持 音乐模型
udio
- 提示词输入一次,生成2首歌曲
- 计费是按次数,并非按歌曲数;模型
udio130-v1.5
的价格 是udio32-v1.5
的2倍 - 如何使用 访问 https://udio.ddaiai.com 看下面的
在线试用
在线测试
在线测试
1.访问 https://udio.ddaiai.com (如果被墙了,换下二级域名前缀 renyi
)
2.如果发现被墙了 可以自己换地址 https://renyi.ddaiai.com
把 renyi
换其他的 如 https://2025.ddaiai.com
都能访问
设置
- 打开 https://udio.ddaiai.com
- 下图相应的地方设置
- Runway接口地址:https://api.openai-hk.com
- Runway KEY: hk-你的apiKey
效果
得到效果
Udio API
- 约定
header
都带有认证Authorization: Bearer hk-你的key
- 地址 https://api.openai-hk.com/udio
创建歌曲
shell
curl --request POST \
--url https://pi.openai-hk.com/udio/submit/music \
--header 'Authorization: Bearer hk-your-key' \
--header 'Content-Type: application/json' \
--data '{
"gen_params": {
"prompt": "mother",
"lyrics": "",
"lyrics_type": "generate",
"bypass_prompt_optimization": false,
"seed": -1,
"song_section_start": 0.4,
"prompt_strength": 0.5,
"clarity_strength": 0.25,
"lyrics_strength": 0.5,
"generation_quality": 0.75,
"negative_prompt": "",
"model_type": "udio32-v1.5",
"config": {
"mode": "regular"
}
}
}'
curl --request POST \
--url https://pi.openai-hk.com/udio/submit/music \
--header 'Authorization: Bearer hk-your-key' \
--header 'Content-Type: application/json' \
--data '{
"gen_params": {
"prompt": "mother",
"lyrics": "",
"lyrics_type": "generate",
"bypass_prompt_optimization": false,
"seed": -1,
"song_section_start": 0.4,
"prompt_strength": 0.5,
"clarity_strength": 0.25,
"lyrics_strength": 0.5,
"generation_quality": 0.75,
"negative_prompt": "",
"model_type": "udio32-v1.5",
"config": {
"mode": "regular"
}
}
}'
场景1:根据描述创建音乐
请求体
json
{
"gen_params": {
"prompt": "mother",
"lyrics": "",
"lyrics_type": "generate",
"bypass_prompt_optimization": false,
"seed": -1,
"song_section_start": 0.4,
"prompt_strength": 0.5,
"clarity_strength": 0.25,
"lyrics_strength": 0.5,
"generation_quality": 0.75,
"negative_prompt": "",
"model_type": "udio32-v1.5",
"config": {
"mode": "regular"
}
}
}
{
"gen_params": {
"prompt": "mother",
"lyrics": "",
"lyrics_type": "generate",
"bypass_prompt_optimization": false,
"seed": -1,
"song_section_start": 0.4,
"prompt_strength": 0.5,
"clarity_strength": 0.25,
"lyrics_strength": 0.5,
"generation_quality": 0.75,
"negative_prompt": "",
"model_type": "udio32-v1.5",
"config": {
"mode": "regular"
}
}
}
场景2:自定义歌词创建音乐
请求体
json
{
"gen_params": {
"prompt": "rock, pop soul, electronic, ",
"lyrics": "你的歌词",
"lyrics_type": "user",
"bypass_prompt_optimization": false,
"seed": -1,
"song_section_start": 0,
"song_section_end": 1,
"lyrics_placement_start": 0,
"lyrics_placement_end": 0.95,
"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": "regular"
}
}
}
{
"gen_params": {
"prompt": "rock, pop soul, electronic, ",
"lyrics": "你的歌词",
"lyrics_type": "user",
"bypass_prompt_optimization": false,
"seed": -1,
"song_section_start": 0,
"song_section_end": 1,
"lyrics_placement_start": 0,
"lyrics_placement_end": 0.95,
"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": "regular"
}
}
}
场景3:音乐续写
json
{
"gen_params": {
"prompt": "father",
"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": "udio32-v1.5",
"config": {
"mode": "precede",
"context_length": 130,
"source": {
"source_type": "song",
"song_id": "续写ID"
}
}
}
}
{
"gen_params": {
"prompt": "father",
"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": "udio32-v1.5",
"config": {
"mode": "precede",
"context_length": 130,
"source": {
"source_type": "song",
"song_id": "续写ID"
}
}
}
}
请求体.关键字说明
gen_params
下的数据
字段 | 类型 | 说明 |
---|---|---|
prompt | string | 提示词 可以是描述 可以是曲风 |
lyrics | string | 歌词 |
lyrics_type | string | 歌词凡是 user 自定义、generate 系统自动生成、instrumental 纯音乐 |
model_type | string | 模型udio130-v1.5 的价格 是 udio32-v1.5 的2倍 |
negative_prompt | string | 负面提示词,不想出现的放这儿 |
config.mode | string | 扩展模式 precede 前扩展、continuation 后扩展、 regular 表示生成音乐 |
config.source.song_id | string | 扩展的任务歌曲id |
lyrics_type=user
表示使用用户提供的歌词(放在 lyrics)生成音乐,此时 prompt 的作用类似于 tags,填写风格。lyrics_type=instrumental
用于创建纯音乐,prompt 用于相关提示词。lyrics_type=generate
表示自动生成歌词,prompt 用于描述需要生成什么样的歌曲。其他参数说明
字段 | 类型 | 说明 |
---|---|---|
song_section_start | number | 对应场景3 有用处 扩展开始的地方 0-1的小数值 |
song_section_end | number | 对应场景3 有用处 扩展结束的地方 0-1的小数值 |
lyrics_placement_start | number | 歌词放置开始位置 0-1的小数值 |
lyrics_placement_end | number | 歌词放置结束位置 0-1的小数值 |
prompt_strength | number | 提示词强度 0-1的小数值 默认0.5 |
clarity_strength | number | 清晰度强度 0-1的小数值 默认0.5 |
lyrics_strength | number | 歌词强度 0-1的小数值 默认0.5 |
generation_quality | number | 可选 0.25 0.5 0.75 1 默认 0.75 ; 数字越大 质量越高 速度越慢 |
seed | number | 随机种子 默认 -1 表示随机 |
bypass_prompt_optimization | boolean | 是否跳过提示词优化 默认为 false |
song_section
用于指定在完整歌曲中生成片段的起始和结束位置。0% (0) 对应歌曲开头,50% (0.5) 对应歌曲中间,100% (1) 对应歌曲结尾。点击数值指示器可切换为自动模式,让模型自行决定最佳位置。这个功能在使用歌曲扩展特性时特别有用。lyrics_placement
用于指定在完整歌曲中放置歌词的位置。8% 对应歌曲开头,50% 对应歌曲中间,90% 将在歌曲结尾处生成片段。这个功能在使用歌曲扩展特性时特别有用。prompt_strength
控制提示词对生成内容的影响程度。较高的值可以提高对提示词的遵循度,但可能会导致生成的声音不够自然。lyrics_strength
控制歌词对生成内容的影响程度。较低的值可能会产生更自然的声音,但可能会忽略部分歌词内容。clarity_strength
控制模型在生成音频时对清晰度和乐器分离度的优先级。较高的值可能会产生更清晰的音频,但声音可能不够自然。generation_quality
实验性功能。用于在生成质量和生成速度之间进行权衡。
返回体
data
为 task_id
json
{
"code": "success",
"message": "",
"data": "得到的task_id 给下一步 获取任务状态使用"
}
{
"code": "success",
"message": "",
"data": "得到的task_id 给下一步 获取任务状态使用"
}
获取任务状态
shell
curl --request GET \
--url https://api.openai-hk.com/udio/fetch/27c2553f-0c1b-4149-8712-359e9acff6c7 \
--header 'Authorization: Bearer hk-your-key' \
--header 'Content-Type: application/json'
curl --request GET \
--url https://api.openai-hk.com/udio/fetch/27c2553f-0c1b-4149-8712-359e9acff6c7 \
--header 'Authorization: Bearer hk-your-key' \
--header 'Content-Type: application/json'
返回体
json
{
"code": "success",
"message": "",
"data": {
"task_id": "dc943e26-ef81-45be-baf7-ce5e121cd448",
"notify_hook": "",
"action": "udio-generate",
"status": "SUCCESS",
"fail_reason": "",
"submit_time": 1731344339,
"start_time": 1731344353,
"finish_time": 1731344393,
"progress": "100%",
"data": {
"songs": [
{
"id": "db71404a-17d4-4fdf-a781-48381362d31b",
"tags": [
"mandopop",
"2010s"
],
"liked": false,
"likes": 0,
"plays": 0,
"title": "Whispers of the Storm",
"artist": "EarthyTimpani8145",
"lyrics": "",
"prompt": "大风大雨",
"user_id": "1cf1a8f9-a14b-4ea9-bc16-5f1cd77613e1",
"disliked": false,
"duration": 32.8106666666667,
"error_id": null,
"finished": true,
"song_path": "https://storage.googleapis.com/udio-artifacts-c33fe3ba-3ffe-471f-92c8-5dfef90b3ea3/samples/28e06eb29c1c4abb9a50c8f6b127afb9/1/Whispers%2520of%2520the%2520Storm.mp3",
"user_tags": [],
"created_at": "2024-11-11T16:58:57.418504+00:00",
"error_code": null,
"error_type": null,
"image_path": "https://imagedelivery.net/C9yUr1FL21Q6JwfYYh2ozQ/a7888419-167e-408b-42d3-7aa6f777ff00/public",
"video_path": null,
"attribution": "",
"description": "",
"publishable": true,
"artist_image": "https://lh3.googleusercontent.com/a/ACg8ocKpwKLHf6tdaLz0OZm_f64g66HWEKmmgxKCtyzkp3M_wFERXA=s96-c",
"error_detail": null,
"published_at": null,
"generation_id": "dc943e26-ef81-45be-baf7-ce5e121cd448",
"replaced_tags": {
"pop": {
"tags": [
"mandopop",
"2010s"
],
"type": "tags"
},
"mandopop, 2010s": {
"tags": [
"mandopop",
"2010s"
],
"type": "tags"
}
},
"original_song_path": null,
"audio_conditioning_type": null
},
{
"id": "e7da256c-e2bf-4b0e-9ef9-0b906d5043f7",
"tags": [
"female vocalist",
"dance-pop",
"passionate",
"energetic",
"uplifting",
"electropop",
"bittersweet",
"contemporary r&b",
"introspective",
"boastful",
"urban",
"ballad",
"brostep",
"mandopop",
"2010s"
],
"liked": false,
"likes": 0,
"plays": 0,
"title": "Storm Over The City",
"artist": "EarthyTimpani8145",
"lyrics": "",
"prompt": "大风大雨",
"user_id": "1cf1a8f9-a14b-4ea9-bc16-5f1cd77613e1",
"disliked": false,
"duration": 32.8106666666667,
"error_id": null,
"finished": true,
"song_path": "https://storage.googleapis.com/udio-artifacts-c33fe3ba-3ffe-471f-92c8-5dfef90b3ea3/samples/28e06eb29c1c4abb9a50c8f6b127afb9/2/Storm%2520Over%2520The%2520City.mp3",
"user_tags": [],
"created_at": "2024-11-11T16:58:57.418504+00:00",
"error_code": null,
"error_type": null,
"image_path": "https://imagedelivery.net/C9yUr1FL21Q6JwfYYh2ozQ/8b07ad93-91d2-4ff7-ef2e-17e0dcb11100/public",
"video_path": null,
"attribution": "",
"description": "",
"publishable": true,
"artist_image": "https://lh3.googleusercontent.com/a/ACg8ocKpwKLHf6tdaLz0OZm_f64g66HWEKmmgxKCtyzkp3M_wFERXA=s96-c",
"error_detail": null,
"published_at": null,
"generation_id": "dc943e26-ef81-45be-baf7-ce5e121cd448",
"replaced_tags": {
"pop": {
"tags": [
"electropop",
"mandopop",
"contemporary r&b",
"dance-pop",
"trap [edm]",
"brostep",
"lgbt",
"boastful",
"passionate",
"introspective",
"lush",
"energetic",
"conscious",
"depressive",
"ballad",
"bittersweet",
"urban",
"uplifting",
"2010s",
"female vocalist"
],
"type": "tags"
},
"electropop, mandopop, contemporary r&b, dance-pop, trap [edm], brostep, lgbt, boastful, passionate, introspective, lush, energetic, conscious, depressive, ballad, bittersweet, urban, uplifting, 2010s, female vocalist": {
"tags": [
"female vocalist",
"dance-pop",
"passionate",
"energetic",
"uplifting",
"electropop",
"bittersweet",
"contemporary r&b",
"introspective",
"boastful",
"urban",
"ballad",
"brostep",
"mandopop",
"2010s"
],
"type": "tags"
}
},
"original_song_path": null,
"audio_conditioning_type": null
}
]
}
}
}
{
"code": "success",
"message": "",
"data": {
"task_id": "dc943e26-ef81-45be-baf7-ce5e121cd448",
"notify_hook": "",
"action": "udio-generate",
"status": "SUCCESS",
"fail_reason": "",
"submit_time": 1731344339,
"start_time": 1731344353,
"finish_time": 1731344393,
"progress": "100%",
"data": {
"songs": [
{
"id": "db71404a-17d4-4fdf-a781-48381362d31b",
"tags": [
"mandopop",
"2010s"
],
"liked": false,
"likes": 0,
"plays": 0,
"title": "Whispers of the Storm",
"artist": "EarthyTimpani8145",
"lyrics": "",
"prompt": "大风大雨",
"user_id": "1cf1a8f9-a14b-4ea9-bc16-5f1cd77613e1",
"disliked": false,
"duration": 32.8106666666667,
"error_id": null,
"finished": true,
"song_path": "https://storage.googleapis.com/udio-artifacts-c33fe3ba-3ffe-471f-92c8-5dfef90b3ea3/samples/28e06eb29c1c4abb9a50c8f6b127afb9/1/Whispers%2520of%2520the%2520Storm.mp3",
"user_tags": [],
"created_at": "2024-11-11T16:58:57.418504+00:00",
"error_code": null,
"error_type": null,
"image_path": "https://imagedelivery.net/C9yUr1FL21Q6JwfYYh2ozQ/a7888419-167e-408b-42d3-7aa6f777ff00/public",
"video_path": null,
"attribution": "",
"description": "",
"publishable": true,
"artist_image": "https://lh3.googleusercontent.com/a/ACg8ocKpwKLHf6tdaLz0OZm_f64g66HWEKmmgxKCtyzkp3M_wFERXA=s96-c",
"error_detail": null,
"published_at": null,
"generation_id": "dc943e26-ef81-45be-baf7-ce5e121cd448",
"replaced_tags": {
"pop": {
"tags": [
"mandopop",
"2010s"
],
"type": "tags"
},
"mandopop, 2010s": {
"tags": [
"mandopop",
"2010s"
],
"type": "tags"
}
},
"original_song_path": null,
"audio_conditioning_type": null
},
{
"id": "e7da256c-e2bf-4b0e-9ef9-0b906d5043f7",
"tags": [
"female vocalist",
"dance-pop",
"passionate",
"energetic",
"uplifting",
"electropop",
"bittersweet",
"contemporary r&b",
"introspective",
"boastful",
"urban",
"ballad",
"brostep",
"mandopop",
"2010s"
],
"liked": false,
"likes": 0,
"plays": 0,
"title": "Storm Over The City",
"artist": "EarthyTimpani8145",
"lyrics": "",
"prompt": "大风大雨",
"user_id": "1cf1a8f9-a14b-4ea9-bc16-5f1cd77613e1",
"disliked": false,
"duration": 32.8106666666667,
"error_id": null,
"finished": true,
"song_path": "https://storage.googleapis.com/udio-artifacts-c33fe3ba-3ffe-471f-92c8-5dfef90b3ea3/samples/28e06eb29c1c4abb9a50c8f6b127afb9/2/Storm%2520Over%2520The%2520City.mp3",
"user_tags": [],
"created_at": "2024-11-11T16:58:57.418504+00:00",
"error_code": null,
"error_type": null,
"image_path": "https://imagedelivery.net/C9yUr1FL21Q6JwfYYh2ozQ/8b07ad93-91d2-4ff7-ef2e-17e0dcb11100/public",
"video_path": null,
"attribution": "",
"description": "",
"publishable": true,
"artist_image": "https://lh3.googleusercontent.com/a/ACg8ocKpwKLHf6tdaLz0OZm_f64g66HWEKmmgxKCtyzkp3M_wFERXA=s96-c",
"error_detail": null,
"published_at": null,
"generation_id": "dc943e26-ef81-45be-baf7-ce5e121cd448",
"replaced_tags": {
"pop": {
"tags": [
"electropop",
"mandopop",
"contemporary r&b",
"dance-pop",
"trap [edm]",
"brostep",
"lgbt",
"boastful",
"passionate",
"introspective",
"lush",
"energetic",
"conscious",
"depressive",
"ballad",
"bittersweet",
"urban",
"uplifting",
"2010s",
"female vocalist"
],
"type": "tags"
},
"electropop, mandopop, contemporary r&b, dance-pop, trap [edm], brostep, lgbt, boastful, passionate, introspective, lush, energetic, conscious, depressive, ballad, bittersweet, urban, uplifting, 2010s, female vocalist": {
"tags": [
"female vocalist",
"dance-pop",
"passionate",
"energetic",
"uplifting",
"electropop",
"bittersweet",
"contemporary r&b",
"introspective",
"boastful",
"urban",
"ballad",
"brostep",
"mandopop",
"2010s"
],
"type": "tags"
}
},
"original_song_path": null,
"audio_conditioning_type": null
}
]
}
}
}