> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kapon.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# 动作控制（Legacy）

> 接口与可灵官网一致；支持参考图片与动作视频驱动生成视频

* 路径 `POST /kling/v1/videos/motion-control`
* 与官网一致：本页请求体、字段命名与返回结构与可灵官网保持一致
* 字段详解：请参考[官网权威文档](https://kling.ai/document-api/api/video/3-0-omni/motion-control/legacy)

请求参数

| 参数                      | 类型     | 必填    | 说明                                               |
| ----------------------- | ------ | ----- | ------------------------------------------------ |
| `model_name`            | string | 否     | 模型名称，仅支持 `kling-v2-6`、`kling-v3`，默认 `kling-v2-6` |
| `prompt`                | string | 否     | 文本提示词，可用于补充元素或运镜描述                               |
| `image_url`             | string | **是** | 参考图片 URL 或 Base64                                |
| `video_url`             | string | **是** | 参考动作视频 URL                                       |
| `element_list`          | array  | 否     | 主体引用列表，当前最多 1 个主体                                |
| `keep_original_sound`   | string | 否     | 是否保留原声：`yes`、`no`，默认 `yes`                       |
| `character_orientation` | string | **是** | 人物朝向：`image`、`video`                             |
| `mode`                  | string | **是** | 生成模式：`std`、`pro`                                 |
| `watermark_info`        | object | 否     | 是否生成含水印结果                                        |
| `callback_url`          | string | 否     | 回调通知地址                                           |
| `external_task_id`      | string | 否     | 自定义任务 ID                                         |

element\_list 格式

```json theme={null}
{
  "element_list": [
    {
      "element_id": 829836802793406551
    }
  ]
}
```

补充约束

* `character_orientation=image` 时，参考视频时长不得超过 10 秒；
* `character_orientation=video` 时，参考视频时长不得超过 30 秒；
* `keep_original_sound` 仅支持 `yes` / `no`；
* `mode` 仅支持 `std` / `pro`；
* `model_name` 仅支持 `kling-v2-6` / `kling-v3`。

### 场景：参考图片 + 参考动作视频生成视频

```bash theme={null}
curl --request POST \
  --url https://models.kapon.cloud/kling/v1/videos/motion-control \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model_name": "kling-v2-6",
    "image_url": "https://example.com/ref.png",
    "prompt": "女孩穿着灰色宽松T恤和牛仔短裤",
    "video_url": "https://example.com/motion.mp4",
    "keep_original_sound": "yes",
    "character_orientation": "image",
    "mode": "pro",
    "external_task_id": "motion-demo-001"
  }'
```

示例响应

```json theme={null}
{
  "code": 0,
  "message": "success",
  "request_id": "req_1735558800_motion123",
  "data": {
    "task_id": "task_01JGHN...",
    "task_info": {
      "external_task_id": "motion-demo-001"
    },
    "task_status": "submitted",
    "created_at": 1735558800000,
    "updated_at": 1735558800000
  }
}
```

任务查询

```bash theme={null}
# 查询单个任务
curl "https://models.kapon.cloud/kling/v1/videos/motion-control/$TASK_ID" \
  -H "Authorization: Bearer $TOKEN"

# 查询任务列表
curl "https://models.kapon.cloud/kling/v1/videos/motion-control?pageNum=1&pageSize=30" \
  -H "Authorization: Bearer $TOKEN"
```


## OpenAPI

````yaml POST /kling/v1/videos/motion-control
openapi: 3.0.3
info:
  title: Kling API
  version: '2026-09-07'
  description: API 2.0 与 Legacy 分开定义；请求使用 Kapon Token。
servers:
  - url: https://models.kapon.cloud
security:
  - BearerAuth: []
paths:
  /kling/v1/videos/motion-control:
    post:
      tags:
        - Kling
      summary: Motion control
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/kling.OfficialMotionControlRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/kling.OfficialResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    kling.OfficialMotionControlRequest:
      type: object
      properties:
        callback_url:
          description: 回调通知地址
          type: string
        character_orientation:
          description: 人物朝向 image/video
          type: string
        element_list:
          description: 主体引用列表
          type: array
          items:
            $ref: '#/components/schemas/kling.OfficialMotionControlElementItem'
        external_task_id:
          description: 自定义任务 ID
          type: string
        image_url:
          description: 参考图片 URL 或 Base64
          type: string
        keep_original_sound:
          description: 是否保留原声 yes/no
          type: string
        mode:
          description: 生成模式 std/pro
          type: string
        model_name:
          description: 模型名称，默认 kling-v2-6
          type: string
        prompt:
          description: 文本提示词
          type: string
        video_url:
          description: 参考动作视频 URL
          type: string
        watermark_info:
          description: 水印信息
          allOf:
            - $ref: '#/components/schemas/kling.OfficialWatermarkInfo'
    kling.OfficialResponse:
      type: object
      properties:
        code:
          description: 错误码
          type: integer
        data:
          description: 单个任务数据
          allOf:
            - $ref: '#/components/schemas/kling.OfficialTaskData'
        data_list:
          description: 任务列表数据（用于列表查询）
          type: array
          items:
            $ref: '#/components/schemas/kling.OfficialTaskData'
        message:
          description: 错误信息
          type: string
        request_id:
          description: 请求ID
          type: string
    kling.OfficialMotionControlElementItem:
      type: object
      properties:
        element_id:
          description: 主体库中主体 ID
          type: integer
    kling.OfficialWatermarkInfo:
      type: object
      properties:
        enabled:
          description: 是否生成含水印结果
          type: boolean
    kling.OfficialTaskData:
      type: object
      properties:
        created_at:
          description: 任务创建时间，Unix时间戳、单位ms
          type: integer
        final_balance_deduction:
          type: object
        final_unit_deduction:
          description: 实际扣减积分
          type: string
        platform_id:
          description: One-Hub 平台统一追踪 ID（video_<ULID>）
          type: string
        task_id:
          description: 任务ID — 上游原始任务 ID
          type: string
        task_info:
          description: 任务创建时的参数信息
          allOf:
            - $ref: '#/components/schemas/kling.OfficialTaskInfo'
        task_result:
          description: 任务结果
          allOf:
            - $ref: '#/components/schemas/kling.OfficialTaskResult'
        task_status:
          description: 任务状态
          type: string
        task_status_msg:
          description: 任务状态信息
          type: string
        updated_at:
          description: 任务更新时间，Unix时间戳、单位ms
          type: integer
        watermark_info:
          description: 水印信息
          allOf:
            - $ref: '#/components/schemas/kling.OfficialWatermarkInfo'
    kling.OfficialTaskInfo:
      type: object
      properties:
        external_task_id:
          description: 客户自定义任务ID
          type: string
    kling.OfficialTaskResult:
      type: object
      properties:
        videos:
          type: array
          items:
            $ref: '#/components/schemas/kling.OfficialVideoResult'
    kling.OfficialVideoResult:
      type: object
      properties:
        duration:
          description: 视频总时长，单位s
          type: string
        id:
          description: 生成的视频ID
          type: string
        url:
          description: 生成视频的URL
          type: string
        watermark_url:
          description: 含水印视频下载URL
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````