音色修改、AI翻唱 · 提交任务
创建一条弹性 GPU 任务,返回平台任务 id
<details>
<summary>基本信息</summary>
| 字段 | 内容 |
|---|---|
| 类型 | 应用 API |
| 应用名称 | 音色修改、AI翻唱 |
| 应用编码 | seedsvc |
| API 名称 | 提交任务 |
| API 编码 | submit |
| 请求方式 | POST |
| 请求路径 | /api/v1/apps/seedsvc/submit |
| 调用模式 | 异步 |
</details>
鉴权
Authorization: Bearer <YOUR_API_KEY>
Content-Type: application/json
请求路径
POST /api/v1/apps/seedsvc/submit
该接口为异步任务,提交后返回 task_id,请通过 GET /api/v1/tasks/{task_id} 查询结果,或在请求中传 callback_url 接收完成回调。
业务参数
| 参数 | 类型 | 必填 | 默认值 | 可选值 / 范围 | 示例 | 说明 |
|---|---|---|---|---|---|---|
mode | string | 否 | async_query | — | — | 任务模式,默认 async_query |
ref_audio | string | 是 | — | — | https://example.com/target_voice.wav | 目标音色参考音频 URL |
source_audio | string | 是 | — | — | https://example.com/original_song.wav | 原始音频文件 URL,需要转换音色的音频 |
请求示例
{
"mode": "async_query",
"ref_audio": "https://example.com/target_voice.wav",
"source_audio": "https://example.com/original_song.wav"
}
成功响应
{
"task_id": "tsk_xxxxxxxxxxxxxxxx",
"status": "pending",
"created_at": 1740000000
}
查询任务结果
GET /api/v1/tasks/{task_id}
{
"task_id": "tsk_xxxxxxxxxxxxxxxx",
"status": "completed",
"created_at": 1740000000,
"completed_at": 1740000060,
"result": {
"output": "任务输出内容"
},
"usage": {
"points": 100
}
}
失败响应
{
"error": {
"message": "点数余额不足",
"type": "insufficient_points",
"code": "insufficient_points"
}
}
错误码
| HTTP | code | 含义 |
|---|---|---|
| 400 | invalid_request | 参数缺失或格式错误 |
| 401 | auth_failed | API Key 缺失或无效 |
| 402 | insufficient_points | 点数余额不足 |
| 402 | key_quota_exceeded | 当前 API Key 点数额度不足 |
| 403 | permission_denied | 当前 API Key 无权调用该模型/应用 |
| 404 | not_found | 模型 / 应用 / 任务不存在 |
| 429 | queue_limit_exceeded | 排队任务已达上限 |
| 5xx | server_error | 服务异常,请稍后重试 |