curl --request POST \
--url https://api.evolink.ai/v1/audios/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "doubao-seed-audio-1-0",
"prompt": "欢迎使用音频生成服务,今天天气真不错。",
"format": "mp3"
}
'{
"created": 1775200000,
"id": "task-unified-1775200000-abcd1234",
"model": "doubao-seed-audio-1-0",
"object": "audio.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 15,
"audio_type": "audio_generation"
},
"type": "audio",
"usage": {
"credits_reserved": 9.6
}
}{
"error": {
"code": "missing_text",
"message": "Missing required parameter: prompt",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: doubao-seed-audio-1-0",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}Seed Audio 1.0
Seed-Audio 1.0 音频生成
- 多模态音频生成,支持纯文本生成、参考音频生成(音色复刻)、参考图片生成三种模式
- 单次最长支持
120秒音频输出 - 异步处理模式,使用返回的任务ID 进行查询
- 生成的音频链接有效期为 7 天,请尽快保存
- 极少数情况下,生成结果会以官方原始链接交付,有效期可能短于 7 天,请及时下载保存。
POST
/
v1
/
audios
/
generations
curl --request POST \
--url https://api.evolink.ai/v1/audios/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "doubao-seed-audio-1-0",
"prompt": "欢迎使用音频生成服务,今天天气真不错。",
"format": "mp3"
}
'{
"created": 1775200000,
"id": "task-unified-1775200000-abcd1234",
"model": "doubao-seed-audio-1-0",
"object": "audio.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 15,
"audio_type": "audio_generation"
},
"type": "audio",
"usage": {
"credits_reserved": 9.6
}
}{
"error": {
"code": "missing_text",
"message": "Missing required parameter: prompt",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: doubao-seed-audio-1-0",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}授权
##所有接口均需要使用Bearer Token进行认证##
获取 API Key:
访问 API Key 管理页面 获取您的 API Key
使用时在请求头中添加:
Authorization: Bearer YOUR_API_KEY
请求体
application/json
用于合成音频的提示词或待合成文本
三种生成模式(按是否传入参考资源自动匹配):
- 纯文本生成:仅传
prompt,按提示词直接生成音频 - 参考音频生成(音色复刻):配合
audio_references;用@音频N引用其中第 N 项(编号从1开始,顺序与数组一致) - 参考图片生成:配合
image_urls,prompt仅需传入待合成文本
音频参考(
audio_references)与图片参考(image_urls)互斥,同一次请求只能选其一。
约束:
- 最大
1500字符
Maximum string length:
1500示例:
"欢迎使用音频生成服务,今天天气真不错。"
参考资源列表。每一项可以是音色 ID,也可以是参考音频 URL,两者可在同一数组内混合使用
- 音色 ID:填写预置音色的
voice_type,完整列表见 Seed-Audio 1.0 音色列表 - 音频 URL:上传一段参考音频做声音复刻
- 与
image_urls互斥:参考音频与参考图片只能二选一,不能在同一请求中同时传入 - 在
prompt中用@音频N引用第 N 项(编号从1开始,顺序与数组一致) - 不传时由模型按
prompt自由生成音色
数量限制:
- 整个数组最多
3个素材(音色 ID 与音频 URL 合计)
音频 URL 约束:
- 每条参考音频时长 ≤
30秒、大小 ≤10 MB - 格式:
wav/mp3/pcm/ogg_opus
Maximum array length:
3示例:
["zh_female_vv_uranus_bigtts"]
任务完成后的HTTPS回调地址
回调时机:
- 任务完成(completed)、失败(failed)或取消(cancelled)时触发
- 在计费确认完成后发送
安全限制:
- 仅支持HTTPS协议
- 禁止回调到内网IP地址(127.0.0.1、10.x.x.x、172.16-31.x.x、192.168.x.x等)
- URL长度不超过
2048字符
回调机制:
- 超时时间:
10秒 - 失败后最多重试
3次(会分别在失败的1秒/2秒/4秒后进行重试) - 回调响应体格式与任务查询接口返回的格式一致
- 回调地址若返回2xx状态码视为成功,其他状态码会触发重试
示例:
"https://your-domain.com/webhooks/audio-completed"
响应
音频生成任务创建成功