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

# Kling 3.0 Text to Video

> Kling 3.0 T2V is APIPod's text-to-video mode for Kling 3.0, Kuaishou's video model with multi-shot storytelling, reusable subject elements, and optional native audio.

## Usage notes

* **Multi-shot**: set `multi_shot` to `true` and describe up to 5 shots in `multi_prompt` (`{prompt, duration}`, 1-12 seconds and up to 500 characters each). The total shot duration must not exceed `duration`; when `duration` is omitted it defaults to the sum of the shots, and `prompt` may be omitted.
* **Elements**: define up to 3 reusable subjects in `kling_elements` and reference them as `@name` in the prompt. Each element uses either 2-4 reference images or exactly one video clip (optionally trimmed with `start_time` / `end_time`, a 3-8 second window in milliseconds), plus an optional 5-30 second voice reference in `element_input_audio_urls`. Each reference counts as 37 characters toward the 2,500-character prompt limit.
* **Audio**: `generate_audio` defaults to `false` for single-shot requests and `true` for multi-shot requests.
* **Not supported**: `negative_prompt` (write exclusions into the prompt), top-level `audio_urls`, and `video_url`.

## Billing

Billed per second of output video. The per-second rate has five tiers: 720p or 1080p, each with or without native audio, plus 4K (same rate with or without audio). Current prices are shown on the [model page](https://www.apipod.ai/models).

## Task flow

The create call returns `data.task_id`. Poll [Query video task](https://docs.apipod.ai/query-video-task.md) until `status` is `completed` (outputs in `data.result`) or `failed`, or pass `callback_url` to be notified when the task reaches a terminal state.


## OpenAPI

````yaml api-reference/openapi/kling-3.0--kling-3.0-t2v.yaml POST /v1/videos/generations
openapi: 3.1.0
info:
  title: Kling 3.0 Text to Video API
  version: 1.0.0
  description: >-
    Kling 3.0 T2V is APIPod's text-to-video mode for Kling 3.0, Kuaishou's video
    model with multi-shot storytelling, reusable subject elements, and optional
    native audio. In APIPod, the public model ID is kling-3.0-t2v. It accepts a
    text prompt (plus optional element reference images) and returns results
    through asynchronous video tasks.
servers:
  - url: https://api.apipod.ai
    description: Production
security: []
paths:
  /v1/videos/generations:
    post:
      tags:
        - Kling 3.0 Text to Video
      summary: Create Generation Task
      description: >-
        Kling 3.0 T2V is APIPod's text-to-video mode for Kling 3.0, Kuaishou's
        video model with multi-shot storytelling, reusable subject elements, and
        optional native audio. In APIPod, the public model ID is kling-3.0-t2v.
        It accepts a text prompt (plus optional element reference images) and
        returns results through asynchronous video tasks.
      operationId: create-kling-3.0-kling-3.0-t2v
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              title: Kling 3.0 Text to Video
              properties:
                model:
                  type: string
                  title: Model ID
                  description: Public APIPod model ID.
                  const: kling-3.0-t2v
                prompt:
                  type: string
                  title: Prompt
                  description: >-
                    Text prompt, up to 2,500 characters. Required unless
                    `multi_prompt` is provided. Reference `kling_elements` with
                    `@name`.
                  maxLength: 2500
                duration:
                  type: integer
                  title: Duration
                  description: >-
                    Output duration in seconds (3-15). Defaults to 5; in
                    multi-shot mode it defaults to the sum of the shot durations
                    when omitted.
                  minimum: 3
                  maximum: 15
                  default: 5
                resolution:
                  type: string
                  title: Resolution
                  description: >-
                    Output resolution (up to 4K). Defaults to 720p. The
                    per-second rate depends on the resolution and, for 720p and
                    1080p, on native audio.
                  enum:
                    - 720p
                    - 1080p
                    - 4k
                  default: 720p
                aspect_ratio:
                  type: string
                  title: Aspect Ratio
                  description: Output aspect ratio. Defaults to 16:9.
                  enum:
                    - '16:9'
                    - '9:16'
                    - '1:1'
                  default: '16:9'
                generate_audio:
                  type: boolean
                  title: Generate Audio
                  description: >-
                    Generate native audio (alias `audio`). Defaults to false for
                    single-shot requests and true for multi-shot requests.
                multi_shot:
                  type: boolean
                  title: Multi Shot
                  description: >-
                    Enable multi-shot generation (alias `multi_shots`). Use
                    together with `multi_prompt` to define each shot.
                multi_prompt:
                  type: array
                  title: Multi Prompt
                  description: >-
                    Shot list for multi-shot generation, up to 5 shots. Each
                    shot is `{prompt, duration}` with a prompt of up to 500
                    characters and a duration of 1-12 seconds; the total must
                    not exceed `duration`.
                  maxItems: 5
                  items:
                    type: object
                    properties:
                      prompt:
                        type: string
                        description: Shot description, up to 500 characters.
                        maxLength: 500
                      duration:
                        type: integer
                        description: Shot duration in seconds (1-12).
                        minimum: 1
                        maximum: 12
                    required:
                      - prompt
                      - duration
                kling_elements:
                  type: array
                  title: Kling Elements
                  description: >-
                    Reusable subject elements (up to 3). Each element has a
                    `name`, a `description` and 2-4 reference images in
                    `element_input_urls`. Reference an element in the prompt
                    with `@name`; each reference counts as 37 characters toward
                    the prompt length.
                  maxItems: 3
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        description: Element name, referenced in the prompt as `@name`.
                      description:
                        type: string
                        description: Short description of the element.
                      element_input_urls:
                        type: array
                        title: Character Media
                        description: >-
                          Either 2-4 publicly accessible image URLs of the
                          subject, or exactly one video URL for a video
                          character subject. Images and video cannot be mixed.
                        minItems: 1
                        maxItems: 4
                        items:
                          type: string
                      element_input_audio_urls:
                        type: array
                        title: Voice or Sound Reference
                        description: >-
                          Optional audio URL that guides the element's voice,
                          tone or sound. The audio must be 5-30 seconds long.
                        maxItems: 1
                        items:
                          type: string
                      start_time:
                        type: integer
                        title: Clip Start
                        description: >-
                          Start of the clip window in milliseconds, for a video
                          character subject only. Defaults to 0.
                        minimum: 0
                      end_time:
                        type: integer
                        title: Clip End
                        description: >-
                          End of the clip window in milliseconds, for a video
                          character subject only. Must exceed `start_time`, and
                          the window must span 3000-8000 ms.
                        minimum: 3000
                    required:
                      - name
                      - description
                      - element_input_urls
                callback_url:
                  type: string
                  title: Callback URL
                  description: HTTPS URL that receives the task's terminal state.
                  default: ''
              required:
                - model
            examples:
              basic:
                summary: Single shot
                value:
                  model: kling-3.0-t2v
                  prompt: >-
                    A red fox runs through a snowy birch forest at sunrise,
                    tracking shot, cinematic lighting.
                  duration: 5
                  resolution: 720p
                  aspect_ratio: '16:9'
                  generate_audio: false
              multi_shot:
                summary: Multi-shot with multi_prompt
                value:
                  model: kling-3.0-t2v
                  multi_shot: true
                  multi_prompt:
                    - prompt: >-
                        Wide shot: a lighthouse on a rocky cliff at dawn, waves
                        crashing below.
                      duration: 2
                    - prompt: >-
                        Close-up: the lighthouse keeper opens the door and looks
                        at the sea.
                      duration: 3
                  duration: 5
                  resolution: 1080p
                  aspect_ratio: '16:9'
              elements:
                summary: Subject element with kling_elements
                value:
                  model: kling-3.0-t2v
                  prompt: >-
                    @hero walks through a neon-lit night market and stops to
                    look at the camera.
                  kling_elements:
                    - name: hero
                      description: A young woman in a yellow raincoat
                      element_input_urls:
                        - https://cdn.example.com/kling-ref-1.jpg
                        - https://cdn.example.com/kling-ref-2.jpg
                  duration: 5
                  resolution: 720p
                  aspect_ratio: '9:16'
      responses:
        '200':
          description: Task accepted
          content:
            application/json:
              schema:
                type: object
                title: Task Submit Response
                description: Standard response for task submission
                properties:
                  code:
                    type: integer
                  data:
                    type: object
                    title: Task Submit Data
                    description: Data content for task submission
                    properties:
                      task_id:
                        type: string
                        description: Task ID used to query the task status.
                  message:
                    type: string
                required:
                  - code
                  - message
                  - data
              example:
                code: 200
                message: success
                data:
                  task_id: vid_task_01JEXAMPLE
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl https://api.apipod.ai/v1/videos/generations \
              -H "Authorization: Bearer $APIPOD_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{
              "model": "kling-3.0-t2v",
              "prompt": "A red fox runs through a snowy birch forest at sunrise, tracking shot, cinematic lighting.",
              "duration": 5,
              "resolution": "720p",
              "aspect_ratio": "16:9",
              "generate_audio": false
            }'
        - lang: Python
          label: Python
          source: |-
            import os
            import requests

            payload = {
              "model": "kling-3.0-t2v",
              "prompt": "A red fox runs through a snowy birch forest at sunrise, tracking shot, cinematic lighting.",
              "duration": 5,
              "resolution": "720p",
              "aspect_ratio": "16:9",
              "generate_audio": False
            }

            response = requests.post(
                "https://api.apipod.ai/v1/videos/generations",
                headers={
                    "Authorization": f"Bearer {os.environ['APIPOD_API_KEY']}",
                    "Content-Type": "application/json",
                },
                json=payload,
                timeout=60,
            )
            response.raise_for_status()
            print(response.json())
        - lang: Go
          label: Go
          source: |-
            package main

            import (
                "bytes"
                "fmt"
                "io"
                "net/http"
                "os"
            )

            func main() {
                body := []byte(`{
              "model": "kling-3.0-t2v",
              "prompt": "A red fox runs through a snowy birch forest at sunrise, tracking shot, cinematic lighting.",
              "duration": 5,
              "resolution": "720p",
              "aspect_ratio": "16:9",
              "generate_audio": false
            }`)

                req, err := http.NewRequest(http.MethodPost, "https://api.apipod.ai/v1/videos/generations", bytes.NewReader(body))
                if err != nil {
                    panic(err)
                }
                req.Header.Set("Authorization", "Bearer "+os.Getenv("APIPOD_API_KEY"))
                req.Header.Set("Content-Type", "application/json")

                resp, err := http.DefaultClient.Do(req)
                if err != nil {
                    panic(err)
                }
                defer resp.Body.Close()
                out, _ := io.ReadAll(resp.Body)
                fmt.Println(resp.Status, string(out))
            }
        - lang: Rust
          label: Rust
          source: |-
            use reqwest::Client;
            use serde_json::json;
            use std::env;

            #[tokio::main]
            async fn main() -> Result<(), Box<dyn std::error::Error>> {
                let payload = json!({
                  "model": "kling-3.0-t2v",
                  "prompt": "A red fox runs through a snowy birch forest at sunrise, tracking shot, cinematic lighting.",
                  "duration": 5,
                  "resolution": "720p",
                  "aspect_ratio": "16:9",
                  "generate_audio": false
                });
                let response = Client::new()
                    .post("https://api.apipod.ai/v1/videos/generations")
                    .bearer_auth(env::var("APIPOD_API_KEY")?)
                    .json(&payload)
                    .send()
                    .await?
                    .error_for_status()?;

                println!("{}", response.text().await?);
                Ok(())
            }
        - lang: JavaScript
          label: JavaScript
          source: >-
            const response = await
            fetch("https://api.apipod.ai/v1/videos/generations", {
              method: "POST",
              headers: {
                Authorization: `Bearer ${process.env.APIPOD_API_KEY}`,
                "Content-Type": "application/json",
              },
              body: JSON.stringify({
                "model": "kling-3.0-t2v",
                "prompt": "A red fox runs through a snowy birch forest at sunrise, tracking shot, cinematic lighting.",
                "duration": 5,
                "resolution": "720p",
                "aspect_ratio": "16:9",
                "generate_audio": false
              }),
            });


            if (!response.ok) {
              throw new Error(`APIPod request failed: ${response.status} ${await response.text()}`);
            }


            console.log(await response.json());
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: APIPod API key
      description: Use your APIPod API key as a Bearer token in the Authorization header.

````

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