# Kling v3 运动控制任务状态

> 视频生成

查询运动控制任务状态和结果 URL。

## 请求地址

`GET https://api.modelverse.cn/v1/tasks/status`

## 请求参数

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| task_id | query | string | Yes | 提交接口返回的异步任务标识。 |

## 响应

- **200** — 任务状态响应。
- **default** — 错误响应。

## OpenAPI 定义

```json
{
  "openapi": "3.1.0",
  "x-language": "zh-CN",
  "info": {
    "title": "Kling-v3 运动控制视频接口文档",
    "version": "1.0.0",
    "description": "Kling v3 统一使用 `kling-v3` 模型 ID，并通过\n`parameters.kling_v3_type: motion_control` 选择运动控制模式。\n该模式使用参考图像和参考视频生成视频。\n"
  },
  "servers": [
    {
      "url": "https://api.modelverse.cn",
      "description": "本模型使用的 ModelVerse 接口地址。"
    }
  ],
  "tags": [
    {
      "name": "Kling/v3 运动控制",
      "description": "Kling/v3 运动控制异步任务接口。"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v1/tasks/submit": {
      "post": {
        "tags": [
          "Kling/v3 运动控制"
        ],
        "operationId": "submitKlingV3MotionControlTask",
        "summary": "Kling v3 运动控制视频生成",
        "description": "提交异步运动控制任务。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KlingV3MotionControlSubmitRequest"
              },
              "example": {
                "model": "kling-v3",
                "input": {
                  "img_url": "https://example.com/character.jpg",
                  "video_url": "https://example.com/motion_reference.mp4",
                  "prompt": "一个人优雅地跳舞"
                },
                "parameters": {
                  "kling_v3_type": "motion_control",
                  "duration": 5,
                  "aspect_ratio": "16:9",
                  "character_orientation": "image",
                  "mode": "std"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "任务提交成功。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskSubmitResponse"
                }
              }
            }
          },
          "default": {
            "description": "错误响应。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tasks/status": {
      "get": {
        "tags": [
          "Kling/v3 运动控制"
        ],
        "operationId": "getKlingV3MotionControlTaskStatus",
        "summary": "Kling v3 运动控制任务状态",
        "description": "查询运动控制任务状态和结果 URL。",
        "parameters": [
          {
            "name": "task_id",
            "in": "query",
            "required": true,
            "description": "提交接口返回的异步任务标识。",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "任务状态响应。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskStatusResponse"
                }
              }
            }
          },
          "default": {
            "description": "错误响应。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API 密钥",
        "description": "在 Authorization 请求头中使用 Bearer 方式传入 ModelVerse API 密钥。"
      }
    },
    "schemas": {
      "KlingV3MotionControlSubmitRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "model",
          "input",
          "parameters"
        ],
        "properties": {
          "model": {
            "type": "string",
            "const": "kling-v3",
            "description": "模型名称，固定为 `kling-v3`。"
          },
          "input": {
            "type": "object",
            "description": "运动控制所需的参考素材和提示词。",
            "additionalProperties": false,
            "required": [
              "img_url",
              "video_url"
            ],
            "properties": {
              "img_url": {
                "type": "string",
                "minLength": 1,
                "description": "参考图片 URL 或原始 Base64；支持 JPG/PNG，最大 10MB，宽高 300～65536px，宽高比 1:2.5～2.5:1。"
              },
              "video_url": {
                "type": "string",
                "format": "uri",
                "description": "参考 MP4/MOV 视频 URL；最大 100MB，宽高 340～3850px，至少 3 秒，横向最长 30 秒、竖向最长 10 秒。"
              },
              "prompt": {
                "type": "string",
                "maxLength": 2500,
                "description": "用于指导视频生成的提示词，最多 2500 个字符。"
              }
            }
          },
          "parameters": {
            "type": "object",
            "description": "运动控制生成参数。",
            "additionalProperties": false,
            "required": [
              "kling_v3_type",
              "character_orientation",
              "mode"
            ],
            "properties": {
              "kling_v3_type": {
                "type": "string",
                "const": "motion_control",
                "description": "选择 Kling v3 运动控制生成模式。"
              },
              "character_orientation": {
                "type": "string",
                "enum": [
                  "image",
                  "video"
                ],
                "description": "角色朝向：与参考图片或参考视频一致。"
              },
              "mode": {
                "type": "string",
                "enum": [
                  "std",
                  "pro"
                ],
                "description": "生成质量模式，`std` 为标准模式，`pro` 为专业模式。"
              },
              "duration": {
                "type": "integer",
                "enum": [
                  5,
                  10
                ],
                "default": 5,
                "description": "生成视频的时长，单位为秒。"
              },
              "aspect_ratio": {
                "type": "string",
                "enum": [
                  "16:9",
                  "9:16",
                  "1:1"
                ],
                "default": "16:9",
                "description": "生成视频的宽高比。"
              },
              "keep_original_sound": {
                "type": "string",
                "enum": [
                  "yes",
                  "no"
                ],
                "default": "yes",
                "description": "是否保留参考视频的原声。"
              },
              "watermark_enabled": {
                "type": "boolean",
                "description": "是否为生成结果添加水印。"
              },
              "external_task_id": {
                "type": "string",
                "description": "用户自定义任务 ID，不覆盖系统任务 ID，且在单个用户下必须唯一。"
              }
            }
          }
        }
      },
      "TaskSubmitResponse": {
        "type": "object",
        "required": [
          "output",
          "request_id"
        ],
        "properties": {
          "output": {
            "type": "object",
            "description": "任务提交结果。",
            "required": [
              "task_id"
            ],
            "properties": {
              "task_id": {
                "type": "string",
                "description": "异步任务的唯一标识。"
              }
            }
          },
          "request_id": {
            "type": "string",
            "description": "本次请求的唯一标识。"
          }
        }
      },
      "TaskStatusResponse": {
        "type": "object",
        "required": [
          "output",
          "request_id"
        ],
        "properties": {
          "output": {
            "type": "object",
            "description": "异步任务的当前状态和结果。",
            "required": [
              "task_id",
              "task_status"
            ],
            "properties": {
              "task_id": {
                "type": "string",
                "description": "异步任务的唯一标识。"
              },
              "task_status": {
                "type": "string",
                "enum": [
                  "Pending",
                  "Running",
                  "Success",
                  "Failure"
                ],
                "description": "任务状态，依次表示等待中、运行中、成功和失败。"
              },
              "urls": {
                "type": "array",
                "description": "任务成功后返回的视频结果地址列表。",
                "items": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "submit_time": {
                "type": "integer",
                "format": "int64",
                "description": "任务提交时间戳。"
              },
              "finish_time": {
                "type": "integer",
                "format": "int64",
                "description": "任务完成时间戳。"
              },
              "error_message": {
                "type": "string",
                "description": "任务失败时返回的错误信息。"
              }
            }
          },
          "usage": {
            "type": "object",
            "description": "本次任务的用量信息。",
            "properties": {
              "duration": {
                "type": "integer",
                "description": "生成视频的时长，单位为秒。"
              }
            }
          },
          "request_id": {
            "type": "string",
            "description": "本次请求的唯一标识。"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "error": {
            "type": "object",
            "description": "错误详情。",
            "additionalProperties": true,
            "properties": {
              "message": {
                "type": "string",
                "description": "错误信息。"
              },
              "type": {
                "type": "string",
                "description": "错误类型。"
              },
              "code": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "错误码；没有错误码时为 null。"
              }
            }
          },
          "request_id": {
            "type": "string",
            "description": "本次请求的唯一标识。"
          }
        }
      }
    }
  }
}
```
