enable_sync_mode 设置为 true(某些模型不支持此参数,但您仍需要通过 id 查询结果),您必须调用查询结果端点来获取最终输出。data.id – 预测的唯一标识符data.urls[0].get – 一个现成的 GET URL,已嵌入 id{
"data": {
"id": "abc",
"model": "model_name",
"outputs": [],
"urls": {
"get": "https://surgeai.one/api/v3/predictions/abc/result"
},
"status": "completed",
"error": null,
"executionTime": 0,
"timings": {
"inference": 0
},
"has_nsfw_contents": [],
"created_at": "2026-01-01 00:00:00"
},
"message": "success",
"code": 200
}| 参数 | 类型 | 必填 | 默认值 | 范围 | 描述 |
|---|---|---|---|---|---|
prompt | string | 是 | - | - | 生成的正向提示词。不得超过 2,500 个字符。 |
negative_prompt | string | 否 | - | - | 生成的负向提示词。不得超过 2,500 个字符。 |
image | string | 否 | - | - | 图生视频的源图像。 |
sound | boolean | 否 | true | true, false | 是否在视频中包含同步声音。 |
aspect_ratio | string | 否 | 16:9 | 16:9, 1:1, 9:16 | 生成视频的宽高比。当未使用图生视频或视频编辑功能时,此参数为必填项。 |
duration | integer | 否 | 5 | 5, 10 | 生成媒体的时长(秒)。 |
voice_list | array | 否 | - | - | 生成视频时使用的声音 id 列表,仅 V2.6 及后续版本的模型支持当前参数。请参阅自定义声音获取声音 id。 |
voice_list.voice_id | string | 是 | - | - | 生成视频时使用的声音 id。一个视频生成任务最多可以引用 2 个声音 |
voice_list 是生成视频时引用的声音列表,voice_id 参数的值通过声音定制接口返回audio 参数支持 .mp3 / .wav 音频文件和 .mp4 / .mov 视频文件。data.id – 预测的唯一标识符data.urls[0].get – 一个现成的 GET URL,已嵌入 iddata.id 是您需要的声音 id。{
"data": {
"id": "123123",
"model": "kling_custom_voice",
"outputs": ["838227563994169418"],
"urls": {
"get": "https://surgeai.one/api/v3/predictions/123123/result"
},
"status": "succeed",
"error": null,
"executionTime": 0,
"timings": null,
"has_nsfw_contents": [],
"created_at": "2026-01-08T21:05:34"
},
"message": "success",
"code": 200
}voice_list 参数中。{
"prompt": "A man is playing a guitar",
"aspect_ratio": "16:9",
"duration": 5,
"sound": true,
"voice_list": ["838227563994169418"]
}| 错误码 | 错误名称 | 描述 |
|---|---|---|
| 401 | Unauthorized | API key 缺失或无效 |
| 403 | Forbidden | 您的 API key 没有权限访问此资源,或余额不足 |
| 429 | Too Many Requests | 您已超出速率限制 |
| 500 | Internal server error | 发生内部服务器错误 |
| 503 | Content policy violation | 内容因安全问题被阻止(实际状态码为 400) |