didn't pass content review 或 PUBLIC_ERROR_AUDIO_FILTERED 时,应修改提示词 / 音频描述或替换参考图。
建议避开真人正脸、未成年人、品牌标识和受保护的动漫影视形象,优先使用虚构主体、非写实风格或已获授权的素材。
认证方式
所有请求都需要在请求头中携带 API Key:
Authorization: Bearer api-key
提交任务
向视频任务端点发送 JSON 请求,成功提交后使用返回的任务 ID 查询进度。
curl -X POST https://aivideo.zpika.com/v1/videos \
-H "Authorization: Bearer api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "veo-omni-flash",
"prompt": "combine these references into a cinematic product launch video",
"duration": 10,
"aspect_ratio": "16:9",
"Ingredients_images": [
"https://your-cdn.com/ref-1.jpg",
"https://your-cdn.com/ref-2.jpg"
]
}'
请求参数
| 字段 | 说明 |
|---|---|
model | 固定为 veo-omni-flash |
duration | 固定为 10 |
aspect_ratio | 支持 16:9 / 9:16,默认横屏 |
Ingredients_images | 多参考图 URL 数组,最多 6 张 |
查询任务
使用提交任务后获得的任务 ID 轮询任务状态。
curl https://aivideo.zpika.com/v1/videos/8c7e4b0e6f3b4b0a9e0a0d8f4f0c1234 \
-H "Authorization: Bearer api-key"
查询返回示例
处理中
{
"id": "8c7e4b0e6f3b4b0a9e0a0d8f4f0c1234",
"task_id": "8c7e4b0e6f3b4b0a9e0a0d8f4f0c1234",
"object": "video",
"created_at": 1714200000000,
"status": "in_progress",
"state": "in_progress",
"task_status": "in_progress",
"progress": 45,
"model": "veo-omni-flash",
"video_url": null,
"metadata": {
"result_urls": []
},
"seconds": "10",
"duration": 10,
"aspect_ratio": "16:9",
"success": false,
"final": false
}
已完成
{
"id": "8c7e4b0e6f3b4b0a9e0a0d8f4f0c1234",
"task_id": "8c7e4b0e6f3b4b0a9e0a0d8f4f0c1234",
"object": "video",
"created_at": 1714200000000,
"status": "completed",
"state": "completed",
"task_status": "completed",
"progress": 100,
"model": "veo-omni-flash",
"video_url": "https://aivideo.zpika.com/generated/video.mp4",
"url": "https://aivideo.zpika.com/generated/video.mp4",
"metadata": {
"result_urls": ["https://aivideo.zpika.com/generated/video.mp4"]
},
"seconds": "10",
"duration": 10,
"aspect_ratio": "16:9",
"success": true,
"final": true,
"completed_at": 1714200180000
}
查询返回字段
| 字段 | 说明 |
|---|---|
id / task_id | 任务 ID,用于继续查询 |
status / state / task_status | 任务状态,三者值一致,便于兼容不同接入方式 |
progress | 任务进度,范围为 0-100 |
video_url | 任务完成后的主视频结果地址 |
url | 完成后的通用结果地址,视频任务中等同于 video_url |
metadata.result_urls | 结果地址数组,通常读取第一项即可 |
seconds / duration | 任务时长,来自提交参数 |
aspect_ratio | 画面比例,来自提交参数 |
success | status 为 completed 时为 true |
final | completed 或 failed 时为 true |
error.message | 失败原因,仅失败时返回 |
状态说明
| status | 含义 | 处理方式 |
|---|---|---|
| queued | 排队中 | 继续轮询 |
| in_progress | 生成中 | 继续轮询 |
| completed | 已完成 | 读取 video_url、url 或 metadata.result_urls |
| failed | 失败 | 查看 error.message |