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

# Kling 1.6

> Kling 1.6 API 可根据文本或首帧生成 5 或 10 秒的视频。Pro 还可设置尾帧。

> [!TIP]
>
> 1. 提交后会返回 `task_id`。如果提供了 `callback_url`，当任务状态变为 `finished` 或 `failed` 时，系统会向 `callback_url` 发送 POST 请求。
> 2. 无论是否提供 `callback_url`，都可以通过统一的[查询任务状态](https://docs.poyo.ai/zh/api-manual/task-management/status.md)接口获取结果。

## 模型

* **kling-1.6/standard** - 高性价比的 Kling 1.6 视频生成
* **kling-1.6/pro** - 更高质量的 Kling 1.6 视频生成

## 功能

* **文生视频**：根据提示词、时长和可选的宽高比生成视频。
* **图生视频**：让首帧图片动起来，可选使用仅 Pro 支持的尾帧控制。
* **Elements**：使用 1 到 4 张参考图片引导生成的视频。
* **时长**：5 或 10 秒。
* **宽高比**：1:1、16:9 和 9:16。Standard 在文生视频和 Elements 中使用 `aspect_ratio`。Standard 图生视频不支持 `aspect_ratio`。Pro 在所有 Kling 1.6 工作流中都支持该参数。
* **提示词控制**：可选 `negative_prompt`；`cfg_scale` 可用于文生视频和图生视频，但不能用于 Elements。

## 输入模式

PoYo 不要求为 Kling 1.6 传公开的 `mode`、`type` 或 `task_type` 字段。
所有 Kling 1.6 请求都需要 `prompt` 和 `duration`。

* 不提供任何图片字段即生成文生视频。
* 提供 `start_image_url` 即生成图生视频。
* 在 `kling-1.6/pro` 中同时提供 `start_image_url` 和 `end_image_url`，可同时控制首帧和尾帧。
* 提供包含 1 到 4 张参考图片的 `image_urls` 即生成 Elements。

`image_urls` 不能与 `start_image_url`、`end_image_url` 或 `cfg_scale` 同时使用。

## 注意事项

### 参数兼容性

Elements 是一种参考图片工作流，使用 1 到 4 张图片引导生成的视频。

| 模型和工作流 | PoYo 如何识别 | 支持的参数 |
| - | - | - |
| 文生视频（`standard` 或 `pro`） | 无图片字段 | `prompt`、`duration`、`aspect_ratio`、`negative_prompt`、`cfg_scale` |
| Standard 图生视频 | `kling-1.6/standard` 并带 `start_image_url` | `prompt`、`duration`、`start_image_url`、`negative_prompt`、`cfg_scale` |
| Pro 图生视频 | `kling-1.6/pro` 并带 `start_image_url` 和可选的 `end_image_url` | `prompt`、`duration`、`aspect_ratio`、`start_image_url`、`end_image_url`、`negative_prompt`、`cfg_scale` |
| Elements（`standard` 或 `pro`） | `image_urls` | `prompt`、`duration`、`aspect_ratio`、`negative_prompt`、`image_urls` |

说明：

* `end_image_url` 需要 `start_image_url`，且仅 `kling-1.6/pro` 支持。
* `kling-1.6/standard` 图生视频不支持 `aspect_ratio`。
* Elements 支持 1 到 4 个 `image_urls`，不支持 `cfg_scale`。


## OpenAPI

````yaml zh/api-manual/video-series/kling-1-6.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: PoYo AI - Kling 1.6 API
  description: Kling 1.6 API 根据文本或首帧生成 5 或 10 秒的视频。Pro 还可以设置尾帧。
  version: 1.0.0
servers:
  - url: https://api.poyo.ai
    description: 生产环境
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Kling 1.6
      summary: 提交 Kling 1.6 视频生成任务
      description: 使用 Kling 1.6 Standard 或 Pro 生成视频。PoYo 会根据输入的图像字段自动选择文生视频、图生视频或 Elements。
      operationId: submitKling16Task
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              kling-1-6-standard-text:
                summary: Kling 1.6 Standard - 文生视频
                value:
                  model: kling-1.6/standard
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      A quiet city street after rain, soft reflections on the
                      pavement as the camera moves forward
                    duration: 5
                    aspect_ratio: '16:9'
                    negative_prompt: blur, low quality, distorted hands
                    cfg_scale: 0.5
              kling-1-6-standard-image:
                summary: Kling 1.6 Standard - 图生视频
                value:
                  model: kling-1.6/standard
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      A landscape photograph comes alive as mist drifts across a
                      quiet mountain lake at sunrise
                    duration: 5
                    start_image_url: https://example.com/start-frame.png
                    negative_prompt: blur, flicker, distorted scenery
                    cfg_scale: 0.45
              kling-1-6-standard-elements:
                summary: Kling 1.6 Standard - Elements
                value:
                  model: kling-1.6/standard
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      A ceramic teapot, linen cloth, and wooden table stay
                      visually consistent as the camera circles the scene
                    duration: 5
                    aspect_ratio: '1:1'
                    image_urls:
                      - https://example.com/reference-1.png
                      - https://example.com/reference-2.png
              kling-1-6-pro-text:
                summary: Kling 1.6 Pro - 文生视频
                value:
                  model: kling-1.6/pro
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      Glass sculptures catch shifting afternoon light inside a
                      quiet gallery as the camera slowly moves past
                    duration: 10
                    aspect_ratio: '16:9'
                    negative_prompt: low quality, jitter, artifacts
                    cfg_scale: 0.35
              kling-1-6-pro-image:
                summary: Kling 1.6 Pro - 图生视频
                value:
                  model: kling-1.6/pro
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      A still indoor scene gently animates as warm afternoon
                      light moves across the room
                    duration: 10
                    aspect_ratio: '16:9'
                    start_image_url: https://example.com/start-frame.png
                    end_image_url: https://example.com/end-frame.png
                    negative_prompt: warped face, flicker, artifacts
                    cfg_scale: 0.4
              kling-1-6-pro-elements:
                summary: Kling 1.6 Pro - Elements
                value:
                  model: kling-1.6/pro
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      Four reference objects form a calm tabletop scene while
                      their shapes and materials stay consistent
                    duration: 5
                    aspect_ratio: '9:16'
                    image_urls:
                      - https://example.com/reference-1.png
                      - https://example.com/reference-2.png
                      - https://example.com/reference-3.png
                      - https://example.com/reference-4.png
      responses:
        '200':
          description: 任务提交成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          description: 请求参数无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: 未授权：API Key 无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          description: Kling 1.6 对外模型标识符
          enum:
            - kling-1.6/standard
            - kling-1.6/pro
        callback_url:
          type: string
          format: uri
          description: 接收结果通知的 Webhook 回调 URL
          example: https://your-domain.com/callback
        input:
          type: object
          required:
            - prompt
            - duration
          description: 生成的输入参数。PoYo 根据提供的图像字段选择生成工作流。
          additionalProperties: false
          properties:
            prompt:
              type: string
              description: 视频生成的文本提示词
              maxLength: 2500
              example: A cinematic video scene
            duration:
              type: integer
              description: 输出时长，单位为秒
              enum:
                - 5
                - 10
              example: 5
            aspect_ratio:
              type: string
              description: >-
                视频宽高比。Standard 在文生视频和 Elements 中支持此参数，Standard 图生视频不支持
                aspect_ratio。Pro 在所有 Kling 1.6 工作流中都支持 aspect_ratio
              enum:
                - '1:1'
                - '16:9'
                - '9:16'
              example: '16:9'
            negative_prompt:
              type: string
              description: 可选的负向提示词
              maxLength: 2500
              example: blur, low quality, artifacts
            cfg_scale:
              type: number
              description: 文生视频和图生视频的提示词引导强度。有效范围为 0 到 1。提供 image_urls 时不支持
              minimum: 0
              maximum: 1
              example: 0.5
            start_image_url:
              type: string
              format: uri
              description: 图生视频的首帧图像 URL。如果省略此项且同时省略 image_urls，请求将按文生视频执行
              example: https://example.com/start-frame.png
            end_image_url:
              type: string
              format: uri
              description: Pro 图生视频的尾帧图像 URL。需要同时提供 start_image_url，且仅 kling-1.6/pro 支持
              example: https://example.com/end-frame.png
            image_urls:
              type: array
              items:
                type: string
                format: uri
              description: >-
                Elements 的 1 到 4 张参考图像 URL。提供后，PoYo 会将请求路由到 Elements。不能与
                start_image_url、end_image_url 或 cfg_scale 同时使用
              minItems: 1
              maxItems: 4
              example:
                - https://example.com/reference-1.png
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
          description: >-
            业务状态码。`200` 表示成功，其他值都表示请求失败。请务必检查这个字段：部分参数校验错误会以 HTTP 200 返回，响应体里的
            `code` 为 `400`。


            - `200`：成功

            - `400`：请求参数无效

            - `401`：API Key 缺失或无效

            - `402`：积分不足

            - `403`：没有权限

            - `404`：资源不存在

            - `408`：请求超时

            - `429`：请求频率超限

            - `500`：服务器内部错误

            - `502`：上游服务错误

            - `503`：服务暂不可用


            详见[错误码](/zh/api-manual/error-codes)。
          enum:
            - 200
            - 400
            - 401
            - 402
            - 403
            - 404
            - 408
            - 429
            - 500
            - 502
            - 503
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
              example: task-unified-1757165031-uyujaw3d
              description: 任务唯一标识，用于查询任务状态
            status:
              type: string
              enum:
                - not_started
                - running
                - finished
                - failed
              example: not_started
              description: >-
                任务状态。提交后立即返回时始终为
                `not_started`。后续状态请通过[查询任务状态](/zh/api-manual/task-management/status)接口或
                `callback_url` 获取。


                - `not_started`：排队中，等待处理

                - `running`：生成中

                - `finished`：已完成，结果在 `files` 或 `output` 中

                - `failed`：失败，详情见 `error_message`
            created_time:
              type: string
              format: date-time
              example: '2025-11-12T10:30:00'
              description: 任务创建时间，ISO 8601 格式
    ErrorResponse:
      type: object
      required:
        - code
        - error
      properties:
        code:
          type: integer
          example: 400
          enum:
            - 200
            - 400
            - 401
            - 402
            - 403
            - 404
            - 408
            - 429
            - 500
            - 502
            - 503
          description: >-
            业务状态码。`200` 表示成功，其他值都表示请求失败。请务必检查这个字段：部分参数校验错误会以 HTTP 200 返回，响应体里的
            `code` 为 `400`。


            - `200`：成功

            - `400`：请求参数无效

            - `401`：API Key 缺失或无效

            - `402`：积分不足

            - `403`：没有权限

            - `404`：资源不存在

            - `408`：请求超时

            - `429`：请求频率超限

            - `500`：服务器内部错误

            - `502`：上游服务错误

            - `503`：服务暂不可用


            详见[错误码](/zh/api-manual/error-codes)。
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
              example: Invalid request parameters
            type:
              type: string
              example: invalid_request_error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        所有 API 接口都需要 Bearer Token 认证。


        创建 API Key：登录 PoYo，进入 **仪表盘 → API
        密钥**（[poyo.ai/zh/dashboard/api-key](https://poyo.ai/zh/dashboard/api-key)），点击创建
        Key。


        在请求头中添加：


        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.