Extend an Existing Video

April 18, 2025 (October 20, 2026)

Table of contents

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

This endpoint extends a previously generated video, continuing the animation from where it left off.

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

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]",
  "task_id": "12345678",
  "prompt": "Continue with the mountain landscape, now showing a sunset",
  "negative_prompt": "people, low quality, distorted",
  "cfg_scale": 0.5,
  "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.

  • task_id is required, the ID of a completed video generation task to extend.
    You can get a list of your tasks from GET /tasks.

  • prompt is optional, text description to guide the extended video generation.
    Maximum length: 2500 characters.

  • negative_prompt is optional, what not to include in the generated video.
    Maximum length: 2500 characters.

  • cfg_scale is optional, guidance scale for video extension.
    Range: 0 to 1. Default: 0.5.

  • enable_audio is optional, add sound effects.
    Supported values: false (default) or true.

  • 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.

Note: The task specified by task_id must be in the succeed status for the extension to work.

Responses
  • 200 OK

    {
      "task": {
        "id": 123456789,
        "userId": 12345,
        "type": "m2v_extend_video",
        "scene": "NORMAL_CREATION",
        "status": 5,
        "status_name": "submitted",
        "status_final": false,
        "taskInfo": {
          "type": "m2v_extend_video",
          "inputs": [
            {
              "name": "input",
              "inputType": "URL",
              "token": null,
              "blobStorage": null,
              "url": "https://s21-kling.klingai.com/video12345.mp4",
              "cover": null,
              "fromWorkId": 12345678
            }
          ],
          "arguments": [
            {
              "name": "prompt",
              "value": "Continue with the mountain landscape, now showing a sunset"
            },
            {
              "name": "negative_prompt",
              "value": "people, low quality, distorted"
            },
            {
              "name": "cfg",
              "value": "0.5"
            },
            {
              "name": "__initialType",
              "value": "m2v_txt2video_hq"
            },
            {
              "name": "__initialPrompt",
              "value": "A majestic mountain landscape with snow-capped peaks and flowing rivers"
            },
            {
              "name": "kling_version",
              "value": "1.6"
            }
          ],
          "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_extend_video",
        "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": "Task is not completed"
    }
    
  • 401 Unauthorized

    {
      "error": "Unauthorized",
      "code": 401
    }
    
  • 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/extend" \
       -H "Content-Type: application/json" \
       -H "Authorization: Bearer …" \
       -d '{
         "email": "[email protected]",
         "task_id": "12345678",
         "prompt": "Continue with the mountain landscape, now showing a sunset",
         "negative_prompt": "people, low quality, distorted"
       }'
    
  • const token = "API token";
    const email = "Previously configured account email";
    const apiUrl = "https://api.useapi.net/v1/kling/videos/extend"; 
    const response = await fetch(apiUrl, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "Authorization": `Bearer ${token}`,
      },
      body: JSON.stringify({
        email: email,
        task_id: "12345678",
        prompt: "Continue with the mountain landscape, now showing a sunset",
        negative_prompt: "people, low quality, distorted"
      })
    });
    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/extend"
    headers = {
        "Content-Type": "application/json", 
        "Authorization" : f"Bearer {token}"
    }
    data = {
        "email": email,
        "task_id": "12345678",
        "prompt": "Continue with the mountain landscape, now showing a sunset",
        "negative_prompt": "people, low quality, distorted"
    }
    response = requests.post(apiUrl, headers=headers, json=data)
    print(response, response.json())
    
Try It