Create Video From Text

April 18, 2025 (October 20, 2026)

Table of contents

  1. Model Support Matrix
  2. Request Headers
  3. Request Body
  4. Responses
  5. Model
  6. Examples
  7. Try It

This endpoint generates a video based on a text prompt.

Model Support Matrix
Feature v4.0 v3.0 v3.0 Turbo v2.6 v2.5
v2.1 Master
v1.6
v1.5
Duration 3-30s 3-15s 3-15s 5/10s 5/10s 5/10s
Aspect ratio 21:9 Yes No No No No No
Mode std
720p
Yes Yes Yes Yes No Yes
Mode pro
1080p
Yes
Paid Kling plan
Yes Yes Yes Yes Yes
Mode 4k
4K
No Yes No No No No
Audio Yes
Always on, stereo
Yes
Default on
Yes
Always on
Yes
Native Audio
(Pro)
Yes
Sound Effects
Yes
Sound Effects
Multi-shot Yes
Always on
Yes No No No No
Prompt length 8000 2500 2500 2500 2500 2500
cfg_scale No No No No No Yes

Kling 4.0 generates 720p (std) and 1080p (pro) video. Kling offers 1080p to paid Kling subscribers only. 4K and HDR are not available for 4.0 yet.

If your Kling account can’t use Kling 4.0 yet, the request returns a 403 error.

https://api.useapi.net/v1/kling/videos/text2video

Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
# Alternatively you can use multipart/form-data
# Content-Type: multipart/form-data
Request Body
{
  "email": "[email protected]",
  "prompt": "A majestic mountain landscape with snow-capped peaks and flowing rivers",
  "negative_prompt": "people, buildings, text, low quality",
  "duration": "10",
  "model_name": "kling-v2-1-master",
  "aspect_ratio": "16:9",
  "replyUrl": "https://your-callback-url.com/webhook",
  "replyRef": "your-reference-id"
}
  • email is optional. Leave it out and the job goes to one of your accounts that has a free job slot, picked at random. Each account runs at most its maxJobs jobs at once, and GET scheduler/available shows the free slots. If no account has a free slot, the response is 429.
    Pass email to run the job on that account (429 if it is busy). Uploaded files, elements, voices, avatars and earlier tasks belong to one account, so pass the email of the account they came from.
    With more than one account, reading the task with GET tasks/task_id needs its account’s email. The response’s task.userId is that account’s session.userId in GET accounts, and GET scheduler lists each running task with its email.

  • prompt is required (unless using multi-shot), the text description of the video to generate. Maximum length: 8000 characters for model 4.0 and 2500 characters for every other model. Cannot be used together with multi-shot parameters (shot_N_prompt/shot_N_duration).

  • negative_prompt is optional, what not to include in the generated video. Models 2.5, 2.6, 3.0 and 4.0 do not support this parameter.
    Maximum length: 2500 characters.

  • cfg_scale is optional, guidance scale for text-to-video generation. Models 2.x, 3.0 and 4.0 do not support this parameter.
    Range: 0 to 1. Default: 0.5.

  • duration is optional, length of the video in seconds. Cannot be used together with multi-shot parameters (shot_N_prompt/shot_N_duration). Supported values depend on model_name:

    Model Supported Durations
    kling-v4-0 3 to 30, default 5
    kling-v3-0, kling-v3-0-turbo 3, 4, 5 (default), 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
    kling-v2-6, v2-5, v2-1-master, v1-6, v1-5 5 (default), 10
  • model_name is optional, the AI model version to use. Supported values: kling-v4-0, kling-v3-0, kling-v3-0-turbo, kling-v2-6, kling-v2-5, kling-v2-1-master, kling-v1-6 (default), kling-v1-5. Model 3.0 Turbo (kling-v3-0-turbo) is a faster 3.0 variant: std/pro modes (no 4k), audio always on (enable_audio not supported), and no multi-shot. Model 4.0 (kling-v4-0) always generates stereo audio and takes 3 to 30 seconds.

  • aspect_ratio is optional, the video aspect ratio. Supported values: 16:9 (default), 9:16, 1:1, and 21:9 (model 4.0 only).

  • mode is optional, quality level. Models 2.1 Master and 2.5 only support pro mode. Supported values: std (standard, default), pro (higher quality, slower generation), or 4k (4K resolution, model 3.0 only). Model 2.6 supports std and pro, but pro is required when enable_audio is true. Model 3.0 adds support for 4k. Model 3.0 Turbo supports std and pro only. Model 4.0 supports std (720p) and pro (1080p). Kling offers 1080p to paid Kling subscribers only.

  • enable_audio is optional, add sound effects (Native Audio for models 2.6 and 3.0). Supported values: false (default) or true. Model 2.6 with enable_audio: true requires mode: pro. Model 3.0 defaults to audio enabled; set enable_audio: false to disable. Models 3.0 Turbo and 4.0 always generate audio and do not accept this parameter.

  • multi_shot is optional, let the model cut the video into several shots on its own (models 3.0 and 4.0). Supported values: false (default) or true. You write one ordinary prompt and Kling decides where the cuts fall — use shot_1_prompt below instead when you want to direct each shot yourself. Ignored when shot_1_prompt is present — directing the shots yourself already turns multi-shot on. Model 4.0 always lets the model use several shots, so it accepts only multi_shot: true. Models 3.0 and 4.0 accept this parameter. Every other model, including 3.0 Turbo, rejects it outright — even multi_shot: false.

  • shot_1_prompt through shot_6_prompt are optional, per-shot text prompts for multi-shot storytelling (models 3.0 and 4.0). Maximum length: 2500 characters per shot. Minimum 2 shots required. Cannot be used together with prompt or duration.

  • shot_1_duration through shot_6_duration are optional, per-shot duration in seconds. Each shot must have both prompt and duration. Total duration must be 3-15 seconds. Shots must be sequential with no gaps (e.g. shot_1 + shot_2, not shot_1 + shot_3).

  • maxJobs is optional, range from 1 to 50.
    Specifies the maximum number of concurrent jobs.

  • replyUrl is optional, a callback URL to receive generation progress and result.
    See GET /tasks/task_id for response model.

  • replyRef is optional, a reference identifier for the callback.

Responses
  • 200 OK

    {
      "task": {
        "id": 123456789,
        "userId": 12345,
        "type": "m2v_txt2video_hq",
        "scene": "NORMAL_CREATION",
        "status": 5,
        "status_name": "submitted",
        "status_final": false,
        "taskInfo": {
          "type": "m2v_txt2video_hq",
          "inputs": [],
          "arguments": [
            {
              "name": "prompt",
              "value": "A majestic mountain landscape with snow-capped peaks and flowing rivers"
            },
            {
              "name": "negative_prompt",
              "value": "people, buildings, text, low quality"
            },
            {
              "name": "cfg",
              "value": "0.5"
            },
            {
              "name": "duration",
              "value": "5"
            },
            {
              "name": "kling_version",
              "value": "1.6"
            },
            {
              "name": "aspect_ratio",
              "value": "16:9"
            }
          ],
          "extraArgs": {},
          "callbackPayloads": [],
          "scene": "NORMAL_CREATION"
        },
        "favored": false,
        "deleted": false,
        "viewed": false,
        "createTime": 1745376611075,
        "updateTime": 1745376611075
      },
      "works": [],
      "status": 5,
      "status_name": "submitted",
      "status_final": false,
      "message": "",
      "limitation": {
        "type": "m2v_txt2video_hq",
        "remaining": 10000,
        "limit": 10000
      },
      "userPoints": {
        "points": [],
        "total": 0
      },
      "userTickets": {
        "ticket": []
      },
      "editProject": null
    }
    
  • 400 Bad Request

    The parameters are invalid. When Kling refuses the submitted parameters, error carries Kling’s own message.

    {
      "error": "Parameter prompt is required"
    }
    
  • 401 Unauthorized

    {
      "error": "Unauthorized",
      "code": 401
    }
    
  • 403 Forbidden

    Your Kling account can’t use the requested model yet, for example Kling 4.0.

    {
      "error": "This Kling account does not have access to the requested model or feature (AUTH.VPrivilegeEscalation)",
      "message": "Service busy (AUTH.VPrivilegeEscalation)"
    }
    
  • 500 Internal Server Error

    Kling uses a 500 response to indicate moderation and other issues with the input. It may be hard to separate actual 500 errors from moderation errors, so use the error field text and your best judgement to tell them apart, since the message field most often has very generic and perhaps misleading text.

    {
      "error": "The content you uploaded appears to violate the community guidelines. (CM_EXT.POther)",
      "message": "Service busy (CM_EXT.POther)"
    }
    

When successful, the response includes a task ID which can be used to check the status using GET /tasks/task_id.

Model
{ // TypeScript, all fields are optional
    task: {
        id: number
        userId: number
        type: string
        scene: string
        status: number
        status_name: 'submitted' | 'failed' | 'processing' | 'succeed'
        status_final: boolean
        taskInfo: {
            type: string
            inputs: Array<{
                name: string
                inputType: string
                token: string | null
                blobStorage: any | null
                url: string
                cover: string | null
                fromWorkId: number | null
            }>
            arguments: Array<{
                name: string
                value: string
            }>
            extraArgs: Record<string, any>
            callbackPayloads: any[]
            scene: string
        }
        favored: boolean
        deleted: boolean
        viewed: boolean
        createTime: number
        updateTime: number
        viewTime: number
    }
    works: Array<any>
    status: number
    status_name: 'submitted' | 'failed' | 'processing' | 'succeed'
    status_final: boolean
    message: string
    error: string
    limitation: {
        type: string
        remaining: number
        limit: number
    }
    userPoints: {
        points: Array<{
            orderId: string
            type: string
            amount: number
            balance: number
            startTime: number
            endTime: number
        }>
        total: number
    }
    userTickets: {
        ticket: Array<{
            orderId: string
            type: string
            packageType: string
            amount: number
            balance: number
            startTime: number
            endTime: number
        }>
    }
    editProject: any | null
}
Examples
  • curl -X POST "https://api.useapi.net/v1/kling/videos/text2video" \
       -H "Content-Type: application/json" \
       -H "Authorization: Bearer …" \
       -d '{
         "email": "[email protected]",
         "prompt": "A majestic mountain landscape with snow-capped peaks and flowing rivers",
         "negative_prompt": "people, buildings, text, low quality",
         "model_name": "kling-v1-6",
         "aspect_ratio": "16:9",
         "mode": "pro"
       }'
    
  • const token = "API token";
    const email = "Previously configured account email";
    const apiUrl = "https://api.useapi.net/v1/kling/videos/text2video"; 
    const response = await fetch(apiUrl, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "Authorization": `Bearer ${token}`,
      },
      body: JSON.stringify({
        email: email,
        prompt: "A majestic mountain landscape with snow-capped peaks and flowing rivers",
        negative_prompt: "people, buildings, text, low quality",
        model_name: "kling-v1-6",
        aspect_ratio: "16:9",
        mode: "pro"
      })
    });
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    token = "API token"
    email = "Previously configured account email"
    apiUrl = "https://api.useapi.net/v1/kling/videos/text2video"
    headers = {
        "Content-Type": "application/json", 
        "Authorization" : f"Bearer {token}"
    }
    data = {
        "email": email,
        "prompt": "A majestic mountain landscape with snow-capped peaks and flowing rivers",
        "negative_prompt": "people, buildings, text, low quality",
        "model_name": "kling-v1-6",
        "aspect_ratio": "16:9",
        "mode": "pro"
    }
    response = requests.post(apiUrl, headers=headers, json=data)
    print(response, response.json())
    
Try It