Ultra I2V Pro (Kling AI V2.6 图片生成视频)
Model ID: ultra_i2v_pro
Advanced multi-subject video effects with enhanced tracking accuracy and overall stability.
Authentication
POST https://cloud.vtrix.ai/model/v1/generation
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
X-Request-Id: xxxxxxx
Code Example
cURL
curl --location 'https://cloud.vtrix.ai/model/v1/generation' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'X-Request-Id: xxxxxxx' \
--data '{
"model": "ultra_i2v_pro",
"input": [
{
"params": {
"image": "example_image",
"mode": "pro",
"prompt": "example_prompt",
"sound": "on",
"duration": "5",
"external_task_id": "example_external_task_id",
"static_mask": "example_static_mask"
}
}
]
}'
Response
{
"data": {
"id": "d5u5obte8783ap44qtj0",
"created_at": 1769757744021,
"status": "in_queue",
"model": "ultra_i2v_pro"
},
"status": {
"code": 200,
"message": "success"
}
}
Polling Example
由于视频生成需要时间,任务创建后需要轮询查询任务状态。
轮询请求
curl --location 'https://cloud.vtrix.ai/api/v1/multi-models-generate/d5u5obte8783ap44qtj0' \
--header 'Authorization: Bearer YOUR_API_KEY'
轮询响应示例(处理中)
{
"data": {
"id": "d5u5obte8783ap44qtj0",
"progress": 0.45,
"created_at": 1769757744021,
"status": "processing",
"model": "ultra_i2v_pro"
},
"status": {
"code": 200,
"message": "success"
}
}
轮询响应示例(完成)
{
"data": {
"id": "d5u5obte8783ap44qtj0",
"created_at": 1769757744021,
"updated_at": 1769757800123,
"status": "success",
"model": "ultra_i2v_pro",
"output": [
{
"type": "video",
"url": "https://example.com/generated-video.mp4",
"duration": 5,
"jobId": "remote_job_id_12345"
}
],
"usage": {
"input_tokens": 0,
"output_tokens": 0,
"total_tokens": 0
}
},
"status": {
"code": 200,
"message": "success"
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | ✅ | Model ID: ultra_i2v_pro |
| image | string | ✅ | 输入图片,支持URL或base64格式,URL会自动转换为base64 |
| mode | string | ✅ | 生成模式,V2.6仅支持pro模式 |
| prompt | string | ❌ | 视频生成提示词,可选,最多2500字符 |
| sound | string | ❌ | 音频开关,可选值: on/off |
| duration | string | ❌ | 视频时长(秒),可选值: 5, 10 |
| external_task_id | string | ❌ | 外部任务ID |
| static_mask | string | ❌ | 静态遮罩 |
| dynamic_masks | array | ❌ | 动态遮罩列表 |
Response Format
返回数据结构
| 名称 | 类型 | 是否必须 | 备注 | 其他信息 |
|---|---|---|---|---|
| error | object | 非必须 | 错误信息 | 备注: 错误信息 |
| - code | integer | 非必须 | 错误码,可能的值:002014001(图片缺失)、002014002(提示词超过2500字符限制)、002014095(内部生成错误)、002014096(结果解析异常)、002014097(HTTP错误响应)、002014098(状态检查异常)、002014099(任务创建异常) | |
| - error_message | string | 非必须 | 错误详细信息 | |
| usage | object | 非必须 | 使用统计信息 | 备注: 使用统计信息 |
| - input_tokens | integer | 非必须 | 输入Token数量(实际为prompt_tokens) | |
| - output_tokens | integer | 非必须 | 输出Token数量(实际为completion_tokens) | |
| - total_tokens | integer | 非必须 | 总Token数量 | |
| - created_at | integer | 非必须 | 任务创建时间戳 | |
| - updated_at | integer | 非必须 | 任务更新时间戳 | |
| output | object | 非必须 | 生成结果 | |
| - status | string | 非必须 | 任务状态: in_queue(排队中)、processing(处理中)、success(成功)、failed(失败) | |
| - content | array | 非必须 | 生成的视频内容列表 | item 类型: object |
| — type | string | 非必须 | 资源类型,例如: video | |
| — url | string | 非必须 | 视频URL地址 | |
| — duration | number | 非必须 | 视频时长(秒) | |
| — jobId | string | 非必须 | 远程任务ID | |
| metadata | object | 非必须 | 元数据信息 | 备注: 元数据信息 |