⚠️ 此文档为旧版自定义 API,不推荐使用新版旧接入入口为 Veo-3.1 快速开始,但 Veo-3.1 旧接入方案自 2026 年 5 月 14 日起暂时无法使用。当前请暂停按旧版 VEO3 自定义 API 新增生产接入;如需要当前可用的 Veo 3.1 视频生成入口,请优先查看 Veo 3.1 官方 API 转发方案。
提交视频任务
提交视频生成任务
请求参数
string
必填
视频生成的文本描述
string
默认值:"veo3"
模型名称。可选值:
veo3- 标准版veo3-fast- 快速版veo3-pro- 专业版veo3-pro-frames- 专业版+帧控制
array
参考图片 URL 数组,最多 5 张
boolean
默认值:false
是否增强提示词
请求示例
curl -X POST "https://api2.laozhang.ai/veo/v1/api/video/submit" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-api-key" \
-d '{
"prompt": "一只猫咪在雨夜散步,准备抓一只老鼠",
"model": "veo3",
"images": ["https://example.com/cat.png"],
"enhance_prompt": true
}'
import requests
url = "https://api2.laozhang.ai/veo/v1/api/video/submit"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer your-api-key"
}
data = {
"prompt": "一只猫咪在雨夜散步,准备抓一只老鼠",
"model": "veo3",
"images": ["https://example.com/cat.png"],
"enhance_prompt": True
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
const response = await fetch('https://api2.laozhang.ai/veo/v1/api/video/submit', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your-api-key'
},
body: JSON.stringify({
prompt: '一只猫咪在雨夜散步,准备抓一只老鼠',
model: 'veo3',
images: ['https://example.com/cat.png'],
enhance_prompt: true
})
});
const data = await response.json();
console.log(data);
响应示例
{
"success": true,
"data": {
"taskId": "veo3:b873872e-7358-4c2f-8d55-bd23f000e14e",
"pollingUrl": "https://asyncdata.net/source/veo3:b873872e-7358-4c2f-8d55-bd23f000e14e",
"status": "processing",
"message": "Task submitted successfully"
}
}
查询任务状态
查询视频生成状态
路径参数
string
必填
任务 ID(从提交接口返回)
请求示例
curl -X GET "https://api2.laozhang.ai/veo/v1/api/video/status/veo3:b873872e-7358-4c2f-8d55-bd23f000e14e" \
-H "Authorization: Bearer your-api-key"
import requests
task_id = "veo3:b873872e-7358-4c2f-8d55-bd23f000e14e"
url = f"https://api2.laozhang.ai/veo/v1/api/video/status/{task_id}"
headers = {
"Authorization": "Bearer your-api-key"
}
response = requests.get(url, headers=headers)
print(response.json())
const taskId = 'veo3:b873872e-7358-4c2f-8d55-bd23f000e14e';
const response = await fetch(`https://api2.laozhang.ai/veo/v1/api/video/status/${taskId}`, {
headers: {
'Authorization': 'Bearer your-api-key'
}
});
const data = await response.json();
console.log(data);
响应状态
- 任务提交
- 图片下载中
- 视频生成中
- 生成完成
{
"success": true,
"data": {
"taskId": "veo3:b873872e-7358-4c2f-8d55-bd23f000e14e",
"pollingUrl": "https://asyncdata.net/source/veo3:b873872e-7358-4c2f-8d55-bd23f000e14e",
"status": "processing",
"message": "Task submitted successfully"
}
}
{
"success": true,
"data": {
"taskId": "veo3:b873872e-7358-4c2f-8d55-bd23f000e14e",
"pollingUrl": "https://asyncdata.net/source/veo3:b873872e-7358-4c2f-8d55-bd23f000e14e",
"upstreamData": {
"created_at": 1751704074528,
"enhanced_prompt": "A cat is walking on a rainy night, preparing to catch a mouse",
"id": "veo3:b873872e-7358-4c2f-8d55-bd23f000e14e",
"images": [
{
"status": "downloading",
"url": "https://tokensceshi.oss-ap-southeast-1.aliyuncs.com/sora/81ecb724-9e01-4f0e-a2ac-0c85802b8841.png"
}
],
"status": "image_downloading"
},
"status": "processing",
"progress": {
"upstreamStatus": "image_downloading",
"retryCount": 0,
"maxRetries": 3
}
}
}
{
"success": true,
"data": {
"taskId": "veo3:b873872e-7358-4c2f-8d55-bd23f000e14e",
"upstreamData": {
"status": "video_generating",
"video_generation_id": "f48aea86a9c27d4c8b15612b6c65d08e",
"video_generation_status": "MEDIA_GENERATION_STATUS_ACTIVE"
},
"status": "processing"
}
}
{
"success": true,
"data": {
"taskId": "veo3:b873872e-7358-4c2f-8d55-bd23f000e14e",
"status": "completed",
"result": {
"video_url": "https://filesystem.site/cdn/20250705/BFvep0SngrqIrN3yDSFChIXAz2mU0M.mp4",
"video_media_id": "CAUSJGRlNzE5MzRhLTljMDgtNDE1Mi05NWVlLThjOTlhMTZlODUyYxokY2U4ZjNiYmUtNGFmZS00NTExLWI4ZDEtMGM1MTFkM2ZlNGIxIgNDQUUqJDJlNTY3OWUyLWQ2YmQtNGVlZS05ZTUwLWMyMWE0MWU3ZDYzNw"
}
}
}
状态说明
| 状态 | 说明 | 下一步操作 |
|---|---|---|
processing | 任务处理中 | 继续轮询状态 |
completed | 生成完成 | 获取视频 URL |
failed | 生成失败 | 检查错误信息 |
HTTP 状态码
成功
请求成功
客户端错误
请求参数错误,检查参数格式和必填项
认证错误
认证失败,检查 API 密钥是否正确
服务器错误
服务器内部错误,请稍后重试或联系支持
错误响应格式
{
"success": false,
"message": "错误描述信息",
"error_code": "ERROR_CODE",
"details": {
"field": "具体错误字段",
"reason": "错误原因"
}
}
常见错误码
| 错误码 | 说明 | 解决方案 |
|---|---|---|
INVALID_PROMPT | 提示词无效 | 检查提示词长度和内容 |
INVALID_MODEL | 模型不存在 | 使用支持的模型名称 |
QUOTA_EXCEEDED | 配额超限 | 联系增加配额 |
TASK_NOT_FOUND | 任务不存在 | 检查任务 ID |