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

# Kling 4.0 Flash 图生视频

> Kling 4.0 Flash 图生视频 API 以一张图片为首帧生成 3–20 秒的 720p 视频，可选提示词控制动作。

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

Kling 4.0 Flash 图生视频以一张图片作为开场画面，生成 3–20 秒的 720p 视频。可添加提示词控制动作、运镜和声音提示，也可以只提交图片，由模型让画面动起来。

Kling 4.0 Flash 是快手 Kling 4.0 视频模型中速度更快的 720p 版本。Vidgo 提供四个模型 ID：[文生视频](https://docs.vidgo.ai/zh/api-manual/video-series/kwaivgi-kling-v4-0-flash-text-to-video.md)、[图生视频](https://docs.vidgo.ai/zh/api-manual/video-series/kwaivgi-kling-v4-0-flash-image-to-video.md)、[参考生视频](https://docs.vidgo.ai/zh/api-manual/video-series/kwaivgi-kling-v4-0-flash-reference-to-video.md)和[视频编辑](https://docs.vidgo.ai/zh/api-manual/video-series/kwaivgi-kling-v4-0-flash-video-edit.md)。

## 模型

* **kwaivgi/kling-v4.0-flash/image-to-video** — Kling 4.0 Flash 图生视频，一张首帧，3–20 秒，720p。

## 功能

* 通过 `image_urls` 提供一张首帧图片。
* 可选提示词，最多 26,000 个字符。
* 时长可选 3 到 20 秒之间的任意整数秒，输出 720p。

## 必填参数

* `image_urls` (string\[])：恰好一个公开的 HTTP(S) 图片 URL，作为首帧。

## 可选参数

* `prompt` (string)：动作和运镜描述，去除首尾空白后 1–26,000 个字符。
* `duration` (integer)：输出时长，`3`–`20` 秒。默认 `5`。
* `resolution` (string)：`720p`。默认 `720p`。

## 输出

任务完成后，[查询任务状态](https://docs.vidgo.ai/zh/api-manual/task-management/status.md)接口和回调内容的 `files` 数组中返回一个 720p MP4 视频。

## 示例

* **雨夜车站**：雨水划过候车室窗户，站务员递给老人的热茶冒着蒸汽，5 秒 ([结果](https://cdn.vidgo.ai/apis/models/kwaivgi/kling-v4.0-flash/image-to-video/v1/01/output.mp4))。

## 注意事项

* `image_urls` 只放一张图片；第二张图片返回 400。
* `model` 和 `callback_url` 放在请求根级，与 `input` 并列。`input` 接收上文列出的字段，其他字段返回 400。
* 积分在提交时预扣，按输出时长以 720p 费率计费。任务失败全额退还。当前费率见[定价页](https://vidgo.ai/apis/api-pricing)。


## OpenAPI

````yaml zh/api-manual/video-series/kwaivgi-kling-v4-0-flash-image-to-video.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Kling 4.0 Flash 图生视频
  description: Kling 4.0 Flash 图生视频 API 以一张图片为首帧生成 3–20 秒的 720p 视频，可选提示词控制动作。
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: 生产环境服务器
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Kling 4.0 Flash Image to Video
      summary: 提交 Kling 4.0 Flash 图生视频 任务
      operationId: submitKling40FlashImageToVideoTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              start-frame:
                summary: 首帧生成视频
                value:
                  model: kwaivgi/kling-v4.0-flash/image-to-video
                  input:
                    prompt: >-
                      Warm steam curls gently upward from the enamel cup of tea
                      as the station attendant hands it to the elderly
                      grandfather; raindrops streak steadily down the dark
                      waiting-room window while warm train headlights glide
                      across the misty platform outside. Subtle slow push-in,
                      preserving faces, clothing, and warm tungsten light.
                      Audio: soft autumn rain and distant train rumble.
                    image_urls:
                      - >-
                        https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png
                    duration: 5
                    resolution: 720p
      responses:
        '200':
          description: 任务提交结果。任务 ID 标识一项异步任务；生成可能仍在进行中。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          description: 请求参数无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: 未授权
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
        - input
      additionalProperties: false
      properties:
        model:
          type: string
          example: kwaivgi/kling-v4.0-flash/image-to-video
        callback_url:
          type: string
          format: uri
          description: 可选的 Webhook URL，用于接收完成或失败通知。
          example: https://your-domain.com/callback
        input:
          type: object
          required:
            - image_urls
          additionalProperties: false
          properties:
            prompt:
              type: string
              minLength: 1
              maxLength: 26000
              description: 可选，描述动作、运镜、光线和声音提示。提供时去除首尾空白后为 1–26,000 个字符。
            image_urls:
              type: array
              minItems: 1
              maxItems: 1
              items:
                type: string
                format: uri
                description: 使用公开可访问的 HTTP(S) 下载链接。
              description: 恰好一张图片，作为视频首帧。
            duration:
              type: integer
              minimum: 3
              maximum: 20
              default: 5
              description: 输出时长，3–20 的整数秒。
            resolution:
              type: string
              enum:
                - 720p
              default: 720p
              description: 输出分辨率。Kling 4.0 Flash 输出 720p 视频。
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
              example: 537F9S6N1LJBX0VK
            status:
              type: string
              example: not_started
            created_time:
              type: string
              format: date-time
              example: '2026-11-25T11:17:21'
    ErrorResponse:
      type: object
      required:
        - detail
      properties:
        detail:
          type: string
          description: 错误信息。参见[错误码](/zh/api-manual/error-codes)。
          example: image_urls must contain exactly 1 start frame
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: '使用 `Authorization: Bearer VIDGO_API_KEY`。'

````

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