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

# Kling 4.0 Flash

> Kling 4.0 Flash, the faster and lower-cost version of Kuaishou's Kling 4.0. Text-to-video, or image-to-video from a **first frame**. 720p only, single takes of up to **20 seconds**.

**Audio** — every generated video comes with a native audio track. It is always on: the model has no switch for it, so `sound` / `generate_audio` are rejected.

**Pricing** — per second of generated video, in tokens (USD at $0.02/token). Text-to-video and image-to-video cost the same:

| resolution | tokens/s | USD/s |
|---|---|---|
| 720p | 5.5715 | $0.11143 |

Example: a 5-second video costs 27.86 tokens.

Returns an `img_uuid`; poll GET /api/v1/jobs/detail (or use `custom_callback_url`) to get the generated video.

**Not accepted by this model** (rejected before any tokens are charged): `image_end_url` and `keyframes` (Flash takes a first frame only — use [Kling 4.0](/api-reference/video-generations/kling-4-0) for last and middle frames), reference images or videos (use [Kling 4.0 Flash Reference to Video](/api-reference/video-generations/kling-4-0-flash-refs)), `sound` / `generate_audio` (audio is always generated), `negative_prompt`, `seed`, `model_params.multi_shot`, and 1080p / 4K.



## OpenAPI

````yaml api-reference/video-generations/openapi-kling-4-0-flash.json POST /api/v1/videos/generations
openapi: 3.1.0
info:
  title: GoEnhance API - Kling 4.0 Flash
  description: >-
    Video generation with Kling 4.0 Flash. Same endpoint as the other Kling
    models; the model is selected by model.
  version: 1.0.0
servers:
  - url: https://api.goenhance.ai
security: []
paths:
  /api/v1/videos/generations:
    post:
      tags:
        - VideoGenerations
      summary: Kling 4.0 Flash
      description: >-
        Kling 4.0 Flash, the faster and lower-cost version of Kuaishou's Kling
        4.0. Text-to-video, or image-to-video from a **first frame**. 720p only,
        single takes of up to **20 seconds**.


        **Audio** — every generated video comes with a native audio track. It is
        always on: the model has no switch for it, so `sound` / `generate_audio`
        are rejected.


        **Pricing** — per second of generated video, in tokens (USD at
        $0.02/token). Text-to-video and image-to-video cost the same:


        | resolution | tokens/s | USD/s |

        |---|---|---|

        | 720p | 5.5715 | $0.11143 |


        Example: a 5-second video costs 27.86 tokens.


        Returns an `img_uuid`; poll GET /api/v1/jobs/detail (or use
        `custom_callback_url`) to get the generated video.


        **Not accepted by this model** (rejected before any tokens are charged):
        `image_end_url` and `keyframes` (Flash takes a first frame only — use
        [Kling 4.0](/api-reference/video-generations/kling-4-0) for last and
        middle frames), reference images or videos (use [Kling 4.0 Flash
        Reference to
        Video](/api-reference/video-generations/kling-4-0-flash-refs)), `sound`
        / `generate_audio` (audio is always generated), `negative_prompt`,
        `seed`, `model_params.multi_shot`, and 1080p / 4K.
      parameters:
        - name: Authorization
          in: header
          description: ''
          required: false
          example: '{{Authorization}}'
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: >-
                Kling 4.0 Flash text-to-video and image-to-video (first frame
                only).


                **Pricing** — per second of generated video:


                - 720p — 5.5715 tokens ($0.11143)
              properties:
                model:
                  type: string
                  enum:
                    - kling-4-0-flash
                  description: Model name. Must be `kling-4-0-flash` on this page.
                prompt:
                  type: string
                  maxLength: 2500
                  description: >-
                    Text prompt describing the scene, motion and camera.
                    Required, up to 2500 characters.
                image_url:
                  type: string
                  format: uri
                  description: >-
                    First-frame image URL. If provided, runs image-to-video (the
                    aspect ratio follows this image); otherwise text-to-video.


                    Up to 10MB, width and height at least 300px, aspect ratio
                    between 2:5 and 5:2. Smaller images are upscaled
                    automatically.
                duration:
                  type: integer
                  minimum: 3
                  maximum: 20
                  default: 5
                  description: Video duration in seconds, any integer from 3 to 20.
                resolution:
                  type: string
                  enum:
                    - 720p
                  default: 720p
                  description: >-
                    Output resolution. Kling 4.0 Flash only supports 720p.
                    `quality` is accepted as a compatible alias.
                ratio:
                  type: string
                  enum:
                    - '16:9'
                    - '9:16'
                    - '1:1'
                    - '21:9'
                  default: '16:9'
                  description: >-
                    Aspect ratio. Text-to-video only; ignored when `image_url`
                    is provided.
                custom_callback_url:
                  type: string
                  format: uri
                  description: >-
                    Optional. A publicly accessible HTTPS URL. When the task
                    status changes (processing / success / failed), GoEnhance
                    sends a POST request to this URL. The request body is
                    identical to the response of GET /api/v1/jobs/detail. If
                    your server does not respond with HTTP 200, the notification
                    is retried up to 3 times, with a 3-second timeout per
                    attempt.
                  example: https://your-server.com/goenhance/callback
              required:
                - model
                - prompt
            example:
              model: kling-4-0-flash
              prompt: >-
                The product slowly rotates on a marble pedestal, soft studio
                light, the camera pushes in for a close-up of the logo
              image_url: https://your-cdn.com/product-front.jpg
              duration: 8
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  msg:
                    type: string
                  data:
                    type: object
                    properties:
                      img_uuid:
                        type: string
                      cost:
                        type: number
                        description: >-
                          Tokens deducted for this request. This is the amount
                          actually charged, so it already reflects any discount
                          active on your account and can be lower than the
                          listed price. Tokens are deducted when the task is
                          accepted, and refunded automatically if the generation
                          ends in failure.
                        example: 5.82
                    required:
                      - img_uuid
                      - cost
                required:
                  - code
                  - msg
                  - data
              examples:
                '1':
                  summary: Success
                  value:
                    code: 0
                    msg: Success
                    data:
                      img_uuid: c12b656c-747a-44fd-9c80-add79b0c52d5
                      cost: 5.82
                '2':
                  summary: Insufficient tokens
                  value:
                    code: 100
                    msg: tokens is not enough
                quota:
                  summary: API key quota exceeded
                  value:
                    code: 101
                    msg: 'API key quota exceeded: 4990 of 5000 tokens used (monthly)'
          headers: {}
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  msg:
                    type: string
                required:
                  - code
                  - msg
              examples:
                '1':
                  summary: Unauthorized
                  value:
                    code: 401
                    msg: Unauthorized
          headers: {}
      deprecated: false
      security: []

````

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