获取 Kling 图生视频任务状态
GET /kling/v1/videos/image2video/{task_id}
查询 Kling 图生视频任务的状态和结果。
基本信息
| 项目 | 内容 |
|---|---|
| Base URL | https://www.yunzhuhub.cn |
| 标签 | 视频生成/Kling格式 |
| Operation ID | getKlingImage2Video |
认证
- BearerAuth:使用 Bearer Token 认证。 格式:
Authorization: Bearer sk-xxxxxx
密钥安全
请只使用你自己的 API Key。示例中的 <YOUR_API_KEY> 必须在本地替换,不要把真实密钥提交到代码仓库或发送给他人。
参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
task_id | path | string | 是 | 任务 ID |
请求体
此接口没有请求体。
请求示例
以下示例只用于复制到本地终端,不会从文档站发送请求。
bash
curl --request GET 'https://www.yunzhuhub.cn/kling/v1/videos/image2video/{task_id}' \
--header 'Authorization: Bearer <YOUR_API_KEY>'响应
200 成功获取任务状态
json
{
"title": "VideoTaskResponse",
"type": "object",
"description": "视频任务状态查询响应",
"properties": {
"task_id": {
"type": "string",
"description": "任务 ID",
"example": "abcd1234efgh"
},
"status": {
"type": "string",
"description": "任务状态",
"enum": [
"queued",
"in_progress",
"completed",
"failed"
],
"example": "completed"
},
"url": {
"type": "string",
"description": "视频资源 URL(成功时)",
"example": "https://example.com/video.mp4"
},
"format": {
"type": "string",
"description": "视频格式",
"example": "mp4"
},
"metadata": {
"$ref": "#/components/schemas/VideoTaskMetadata"
},
"error": {
"$ref": "#/components/schemas/VideoTaskError"
}
}
}404 任务不存在
json
{
"title": "ErrorResponse",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "错误信息"
},
"type": {
"type": "string",
"description": "错误类型"
},
"param": {
"type": "string",
"description": "相关参数",
"nullable": true
},
"code": {
"type": "string",
"description": "错误代码",
"nullable": true
}
}
}
}
}