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

# Kling V3 Video

> Create asynchronous video tasks with kling-v3-video via POST /v1/predictions.

## Overview

**Kling V3** (`kling-v3-video`) supports:

* **Text-to-video** — `prompt` only
* **First / last frame** — `first_frame_url`, `last_frame_url`

## Input parameters

| Field             | Required | Default    | Notes                    |
| ----------------- | -------- | ---------- | ------------------------ |
| `prompt`          | Yes      | —          | Max **2500** characters  |
| `aspect_ratio`    | No       | `16:9`     | `16:9`, `9:16`, or `1:1` |
| `resolution`      | No       | `standard` | `standard` or `pro`      |
| `duration`        | No       | `5`        | `3`–`15` (seconds)       |
| `generate_audio`  | No       | `true`     | Include generated audio  |
| `first_frame_url` | No       | —          | First keyframe image URL |
| `last_frame_url`  | No       | —          | Last keyframe image URL  |


## OpenAPI

````yaml en/api-reference/video-series/kling/kling-v3-video-generate.json POST /v1/predictions
openapi: 3.1.0
info:
  title: Kling V3 Video
  version: 1.0.0
servers:
  - url: https://api.shuyou.ai
security:
  - bearerAuth: []
paths:
  /v1/predictions:
    post:
      tags:
        - Video Generation
      summary: Kling V3 Video
      description: >-
        Kling V3 (`kling-v3-video`) creates videos asynchronously via POST
        /v1/predictions. Supports text-to-video and first/last frame. Poll [Get
        a prediction](/en/api-reference/task-management/get-prediction) using
        `data.task_id`, or configure top-level `webhook` for completion
        callbacks.
      operationId: createKlingV3VideoPrediction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KlingV3VideoPredictionRequest'
            examples:
              text_to_video:
                summary: Text to video
                value:
                  model: kling-v3-video
                  input:
                    prompt: >-
                      A cinematic shot of a majestic lion in the savannah at
                      golden hour
                    aspect_ratio: '16:9'
                    resolution: standard
                    duration: 5
                    generate_audio: true
              text_to_video_minimal:
                summary: Minimal request
                value:
                  model: kling-v3-video
                  input:
                    prompt: A cat playing on the grass
              first_last_frame:
                summary: First / last frame
                value:
                  model: kling-v3-video
                  input:
                    prompt: Smooth transition between the two keyframes
                    aspect_ratio: '9:16'
                    resolution: pro
                    duration: 8
                    first_frame_url: https://example.com/first-frame.png
                    last_frame_url: https://example.com/last-frame.png
                  webhook: https://api.shuyou.ai/backend/api/callback
      responses:
        '200':
          description: Async task created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PredictionTaskResponse'
              example:
                data:
                  task_id: 2c4d50261173430290971a2395a3b607
                  task_status: processing
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: Insufficient quota
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Model access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    KlingV3VideoPredictionRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          description: Model ID. Use `kling-v3-video` for this endpoint.
          enum:
            - kling-v3-video
          default: kling-v3-video
          example: kling-v3-video
        input:
          $ref: '#/components/schemas/KlingV3VideoInput'
        webhook:
          type: string
          format: uri
          description: >-
            Optional HTTPS callback URL when the task completes, fails, or is
            cancelled.
    PredictionTaskResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            task_id:
              type: string
              description: Async task ID. Use with Get a prediction or webhook correlation.
              example: 2c4d50261173430290971a2395a3b607
            task_status:
              type: string
              description: Current task status, e.g. `processing`.
              example: processing
          required:
            - task_id
            - task_status
      required:
        - data
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            type:
              type: string
    KlingV3VideoInput:
      type: object
      required:
        - prompt
      properties:
        prompt:
          type: string
          maxLength: 2500
          description: The text prompt describing the video you want to generate.
          example: A cinematic shot of a majestic lion in the savannah at golden hour
        aspect_ratio:
          type: string
          description: The aspect ratio of the generated video.
          enum:
            - '16:9'
            - '9:16'
            - '1:1'
          default: '16:9'
          example: '16:9'
        resolution:
          type: string
          description: The resolution tier of the generated video.
          enum:
            - standard
            - pro
          default: standard
          example: standard
        duration:
          type: integer
          description: The duration of the generated video in seconds.
          enum:
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
            - 10
            - 11
            - 12
            - 13
            - 14
            - 15
          default: 5
          example: 5
        generate_audio:
          type: boolean
          description: Whether to generate audio for the video.
          default: true
          example: true
        first_frame_url:
          type: string
          format: uri
          description: URL of the first frame of the video.
        last_frame_url:
          type: string
          format: uri
          description: URL of the last frame of the video.
      additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: '`Authorization: Bearer YOUR_API_KEY`'

````