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

# Multi-element Video Editing

> Source: https://kling.ai/document-api/api/video/multi-elements
> Locale: en
> Current Tab: Multi-element Video Editing
> This content is optimized for LLMs. In-page tabs are expanded and UI-only controls are omitted.

---

## Initialize Video for Editing

### API Overview

- Method: `POST`
- Path: `/v1/videos/multi-elements/init-selection`
- Auth: `Authorization: Bearer <API_KEY>`
- Content-Type: `application/json`

### Description

> Initialize the original video before using Multi-element Video Editing feature. When replacing or removing elements within the existing video, the relevant elements need to be marked in the video beforehand.

### Headers

| Field | Type | Required | Default | Enum | Description |
|---|---|---:|---|---|---|
| `Content-Type` | string | Yes | `application/json` | - | Data Exchange Format |
| `Authorization` | string | Yes | - | - | Authentication information, refer to API authentication |

### Request Body

| Field Path | Type | Required | Default | Enum | Description |
|---|---|---:|---|---|---|
| `video_id` | string | No | - | - | The ID of the video generated by the Kling AI |
| `video_url` | string | No | - | - | Get link for uploaded video |

#### Request Body Field Notes

- `video_id`: Only videos generated within the last 30 days are supported
- `video_id`: Only supports videos with a duration of ≥2 seconds and ≤5 seconds, or ≥7 seconds and ≤10 seconds
- `video_id`: Related to the video_url parameter: video_id and video_url cannot both be empty or both be provided at the same time.
- `video_url`: Only .mp4/.mov formats are supported
- `video_url`: Only supports videos with a duration of ≥2 seconds and ≤5 seconds, or ≥7 seconds and ≤10 seconds
- `video_url`: Video resolution must be between 720px and 2160px (inclusive) in both width and height
- `video_url`: Only supports videos with frame rates of 24, 30, or 60 fps
- `video_url`: Related to the video_id parameter: video_id and video_url cannot both be empty or both be provided at the same time.

### Request Example

```bash
curl --request POST \
  --url https://api-singapore.klingai.com/v1/videos/multi-elements/init-selection \
  --header "Authorization: Bearer ${KLING_API_KEY}" \
  --header 'Content-Type: application/json' \
  --data '{
    "video_id": "",
    "video_url": "https://v1-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/animals-output-5s.mp4"
  }'
```

### Response Example

```json
{
  "code": 0, // Error code; Specific definitions can be found in "Error Code"
  "message": "string", // Error message
  "request_id": "string", // Request ID, generated by the system, used for tracking requests and troubleshooting
  "data": {
    "status": 0, // Rejection code, non-zero indicates recognition failure
    "session_id": "id", // Session ID, generated during video initialization task, remains unchanged during editing operations, valid for 24 hours
    "final_unit_deduction": "string", // The deduction units of task
    "final_balance_deduction": { // Balance deduction information
      "quota": "string", // Balance deduction discount price
      "list_price": "string" // Balance deduction list price
    },
    "fps": 30.0, // Frame rate of parsed video, required when fetching selection preview video
    "original_duration": 1000, // Duration of parsed video, required when creating task
    "width": 720, // Width of parsed video, currently unused
    "height": 1280, // Height of parsed video, currently unused
    "total_frame": 300, // Total frame count of parsed video, required when creating task
    "normalized_video": "url" // URL of initialized video
}
```

---

## Add Video Selection Area

### API Overview

- Method: `POST`
- Path: `/v1/videos/multi-elements/add-selection`
- Auth: `Authorization: Bearer <API_KEY>`
- Content-Type: `application/json`

### Headers

| Field | Type | Required | Default | Enum | Description |
|---|---|---:|---|---|---|
| `Content-Type` | string | Yes | `application/json` | - | Data Exchange Format |
| `Authorization` | string | Yes | - | - | Authentication information, refer to API authentication |

### Request Body

| Field Path | Type | Required | Default | Enum | Description |
|---|---|---:|---|---|---|
| `session_id` | string | Yes | - | - | Session ID, generated during the video initialization task and remains unchanged during editing operations |
| `frame_index` | int | Yes | - | - | Frame Number |
| `points` | array | Yes | - | - | Click Coordinates, represented by x and y |
| `points[].x` | float | Yes | - | - | X coordinate [0-1] |
| `points[].y` | float | Yes | - | - | Y coordinate [0-1] |

#### Request Body Field Notes

- `frame_index`: A maximum of 10 frames can be marked. That is, up to 10 frames can be used to define selection areas in the video
- `frame_index`: Only supports marking 1 frame at a time
- `points`: Value range: [0, 1], expressed as percentages; [0, 1] represents the top-left corner of the frame
- `points`: Multiple points can be marked at once; up to 10 points can be marked on a single frame

### Request Example

```bash
curl --request POST \
  --url https://api-singapore.klingai.com/v1/videos/multi-elements/add-selection \
  --header "Authorization: Bearer ${KLING_API_KEY}" \
  --header 'Content-Type: application/json' \
  --data '{
    "session_id": "847570360458960960",
    "frame_index": 0,
    "points": [
      {
        "x": 0.7738498789346246,
        "y": 0.297142857142857
      }
    ]
  }'
```

### Response Example

```json
{
  "code": 0, // Error code; Specific definitions can be found in "Error Code"
  "message": "string", // Error message
  "request_id": "string", // Request ID, generated by the system, used for tracking requests and troubleshooting
  "data": {
    "status": 0, // Rejection code, non-zero indicates recognition failure
    "session_id": "id", // Session ID, generated during video initialization task, remains unchanged during editing operations, valid for 24 hours
    "final_unit_deduction": "string", // The deduction units of task
    "final_balance_deduction": { // Balance deduction information
      "quota": "string", // Balance deduction discount price
      "list_price": "string" // Balance deduction list price
    },
    "res": {
      "frame_index": 0,
      "rle_mask_list": [{
        "object_id": 0,
        "rle_mask": {
          "size": [720, 1280],
          "counts": "string"
        },
        "png_mask": {
          "size": [720, 1280],
          "base64": "string"
        }
      }]
    }
  }
}
```

### Sample Code

#### Decoding Image Segmentation Result

```typescript
export type RLEObject = {
    size: [h: number, w: number];
    counts: string;
};
type RLE = {
    h: number;
    w: number;
    m: number;
    binaries: number[];
};
export function decode(rleObj: RLEObject) {
    const [h, w] = rleObj.size;
    const R: RLE = { h, w, m: 0, binaries: [0] };
    rleFrString(R, rleObj.counts);
    const unitArray = new Uint8Array(h * w);
    rleDecode(R, unitArray);
    return unitArray;
}
function rleDecode(R: RLE, M: Uint8Array) {
    let j;
    let k;
    let p = 0;
    let v = false;
    for (j = 0; j < R.m; j++) {
        for (k = 0; k < R.binaries[j]; k++) {
            const x = Math.floor(p / R.h);
            const y = p % R.h;
            M[y * R.w + x] = v === false ? 0 : 1; // Note: y * width + x indicates row-major (horizontal) layout.
            p++;
        }
        v = !v;
    }
}
function rleFrString(R: RLE, s: string) {
    let m = 0;
    let p = 0;
    let k;
    let x;
    let more;
    const binaries = [];
    while (s[p]) {
        x = 0;
        k = 0;
        more = 1;
        while (more) {
            const c = s.charCodeAt(p) - 48;
            x |= (c & 0x1f) << (5 * k);
            more = c & 0x20;
            p++;
            k++;
            if (!more && c & 0x10) {
                x |= -1 << (5 * k);
            }
        }
        if (m > 2) {
            x += binaries[m - 2];
        }
        binaries[m++] = x;
    }
    R.m = m;
    R.binaries = binaries;
}
```

#### Rendering The Segmentation Mask Layer

```typescript
// height refers to the video height and width refers to the video width
function drawMask(rleMask: string, height: number, width: number) {
    if (!canvasRef.value) return;
    const ctx = canvasRef.value.getContext('2d');
    if (!ctx) return;

    const decodeData = decode({ counts: rleMask, size: [height, width] });
    const imageData = ctx.createImageData(width, height);
    for (let y = 0; y < height; y++) {
        for (let x = 0; x < width; x++) {
            const index = y * width + x;
            if (decodeData[index]) {
                const imageIndex = index * 4;
                // Set pixel color: red, green, blue, alpha
                imageData.data[imageIndex] = 116; // red
                imageData.data[imageIndex + 1] = 255; // green
                imageData.data[imageIndex + 2] = 82; // blue
                imageData.data[imageIndex + 3] = 163; // alpha
            }
        }
    }
    ctx.putImageData(imageData, 0, 0);
}
```

---

## Delete Video Selection Area

### API Overview

- Method: `POST`
- Path: `/v1/videos/multi-elements/delete-selection`
- Auth: `Authorization: Bearer <API_KEY>`
- Content-Type: `application/json`

### Headers

| Field | Type | Required | Default | Enum | Description |
|---|---|---:|---|---|---|
| `Content-Type` | string | Yes | `application/json` | - | Data Exchange Format |
| `Authorization` | string | Yes | - | - | Authentication information, refer to API authentication |

### Request Body

| Field Path | Type | Required | Default | Enum | Description |
|---|---|---:|---|---|---|
| `session_id` | string | Yes | - | - | Session ID, generated during the video initialization task and remains unchanged during editing operations |
| `frame_index` | int | Yes | - | - | Frame Number |
| `points` | array | Yes | - | - | Click Coordinates to delete, represented by x and y |
| `points[].x` | float | Yes | - | - | X coordinate [0-1] |
| `points[].y` | float | Yes | - | - | Y coordinate [0-1] |

#### Request Body Field Notes

- `points`: Value range: [0, 1], expressed as percentages; [0, 1] represents the top-left corner of the frame
- `points`: Multiple points can be provided at once
- `points`: Coordinates must exactly match those used when adding the video selection area

### Request Example

```bash
curl --request POST \
  --url https://api-singapore.klingai.com/v1/videos/multi-elements/delete-selection \
  --header "Authorization: Bearer ${KLING_API_KEY}" \
  --header 'Content-Type: application/json' \
  --data '{
    "session_id": "847570360458960960",
    "frame_index": 0,
    "points": [
      {
        "x": 0.7738498789346246,
        "y": 0.297142857142857
      }
    ]
  }'
```

### Response Example

```json
{
  "code": 0, // Error code; Specific definitions can be found in "Error Code"
  "message": "string", // Error message
  "request_id": "string", // Request ID, generated by the system, used for tracking requests and troubleshooting
  "data": {
    "status": 0, // Rejection code, non-zero indicates recognition failure
    "session_id": "id", // Session ID, generated during video initialization task, remains unchanged during editing operations, valid for 24 hours
    "final_unit_deduction": "string", // The deduction units of task
    "final_balance_deduction": { // Balance deduction information
      "quota": "string", // Balance deduction discount price
      "list_price": "string" // Balance deduction list price
    },
    "res": {
      "frame_index": 0,
      "rle_mask_list": [{
        "object_id": 0,
        "rle_mask": {
          "size": [720, 1280],
          "counts": "string"
        },
        "png_mask": {
          "size": [720, 1280],
          "base64": "string"
        }
      }]
    }
  }
}
```

---

## Clear Video Selection

### API Overview

- Method: `POST`
- Path: `/v1/videos/multi-elements/clear-selection`
- Auth: `Authorization: Bearer <API_KEY>`
- Content-Type: `application/json`

### Headers

| Field | Type | Required | Default | Enum | Description |
|---|---|---:|---|---|---|
| `Content-Type` | string | Yes | `application/json` | - | Data Exchange Format |
| `Authorization` | string | Yes | - | - | Authentication information, refer to API authentication |

### Request Body

| Field Path | Type | Required | Default | Enum | Description |
|---|---|---:|---|---|---|
| `session_id` | string | Yes | - | - | Session ID, generated during the video initialization task and remains unchanged during editing operations |

### Request Example

```bash
curl --request POST \
  --url https://api-singapore.klingai.com/v1/videos/multi-elements/clear-selection \
  --header "Authorization: Bearer ${KLING_API_KEY}" \
  --header 'Content-Type: application/json' \
  --data '{
    "session_id": "847570360458960960"
  }'
```

### Response Example

```json
{
  "code": 0, // Error code; Specific definitions can be found in "Error Code"
  "message": "string", // Error message
  "request_id": "string", // Request ID, generated by the system, used for tracking requests and troubleshooting
  "data": {
    "status": 0, // Rejection code, non-zero indicates recognition failure
    "session_id": "id" // Session ID, generated during video initialization task, remains unchanged during editing operations, valid for 24 hours
    "final_unit_deduction": "string", // The deduction units of task
    "final_balance_deduction": { // Balance deduction information
      "quota": "string", // Balance deduction discount price
      "list_price": "string" // Balance deduction list price
    },
  }
}
```

---

## Preview Video with Selected Areas

### API Overview

- Method: `POST`
- Path: `/v1/videos/multi-elements/preview-selection`
- Auth: `Authorization: Bearer <API_KEY>`
- Content-Type: `application/json`

### Headers

| Field | Type | Required | Default | Enum | Description |
|---|---|---:|---|---|---|
| `Content-Type` | string | Yes | `application/json` | - | Data Exchange Format |
| `Authorization` | string | Yes | - | - | Authentication information, refer to API authentication |

### Request Body

| Field Path | Type | Required | Default | Enum | Description |
|---|---|---:|---|---|---|
| `session_id` | string | Yes | - | - | Session ID, generated during the video initialization task and remains unchanged during editing operations |

### Request Example

```bash
curl --request POST \
  --url https://api-singapore.klingai.com/v1/videos/multi-elements/preview-selection \
  --header "Authorization: Bearer ${KLING_API_KEY}" \
  --header 'Content-Type: application/json' \
  --data '{
    "session_id": "847570360458960960"
  }'
```

### Response Example

```json
{
  "code": 0, // Error code; Specific definitions can be found in "Error Code"
  "message": "string", // Error message
  "request_id": "string", // Request ID, generated by the system, used for tracking requests and troubleshooting
  "data": {
    "status": 0, // Rejection code, non-zero indicates recognition failure
    "session_id": "id", // Session ID, generated during video initialization task, remains unchanged during editing operations, valid for 24 hours
    "final_unit_deduction": "string", // The deduction units of task
    "final_balance_deduction": { // Balance deduction information
      "quota": "string", // Balance deduction discount price
      "list_price": "string" // Balance deduction list price
    },
    "res": {
      "video": "url", // Video with mask
      "video_cover": "url", // Cover image of video with mask
      "tracking_output": "url" // Mask result for each frame in image segmentation results
    }
  }
}
```

---

## Create Task

### API Overview

- Method: `POST`
- Path: `/v1/videos/multi-elements`
- Auth: `Authorization: Bearer <API_KEY>`
- Content-Type: `application/json`

### Headers

| Field | Type | Required | Default | Enum | Description |
|---|---|---:|---|---|---|
| `Content-Type` | string | Yes | `application/json` | - | Data Exchange Format |
| `Authorization` | string | Yes | - | - | Authentication information, refer to API authentication |

### Request Body

| Field Path | Type | Required | Default | Enum | Description |
|---|---|---:|---|---|---|
| `session_id` | string | Yes | - | - | Session ID, generated during the video initialization task and remains unchanged during editing operations |
| `edit_mode` | string | Yes | - | `addition`, `swap`, `removal` | Operation Type |
| `image_list` | array | No | - | - | Cropped Reference Images |
| `image_list[].image` | string | Yes | - | - | Image URL or Base64 string |
| `prompt` | string | Yes | - | - | Positive Prompt |
| `negative_prompt` | string | No | - | - | Negative Prompt |
| `mode` | string | No | `std` | `std`, `pro` | Video Generation Mode |
| `duration` | string | No | `5` | `5`, `10` | Video Duration (in seconds) |
| `watermark_info` | object | No | - | - | Whether to generate watermarked results simultaneously |
| `callback_url` | string | No | - | - | Callback URL for Task Result Notification. If configured, the server will actively send notifications when the task status changes |
| `external_task_id` | string | No | - | - | Custom Task ID |

#### Request Body Field Notes

- `edit_mode`: addition: Add an element
- `edit_mode`: swap: Replace an element
- `edit_mode`: removal: Remove an element
- `image_list`: For adding video elements: This parameter is required; upload 1–2 images
- `image_list`: For editing (swapping) video elements: This parameter is required; upload 1 image only
- `image_list`: For deleting video elements: This parameter is not required
- `image_list`: Use key:value format as follows:
  ```json
  "image_list":[
    { "image":"image_url" },
    { "image":"image_url" }
  ]
  ```
- `image_list`: The API does not perform cropping, please upload images with subjects already cropped
- `image_list`: Supports image input as either Base64-encoded string or URL (ensure the URL is publicly accessible)
- `image_list`: Important: When using Base64, do NOT add any prefix like `data:image/png;base64,`. Submit only the raw Base64 string.
- `image_list`: Correct Base64 format:
  ```plaintext
  iVBORw0KGgoAAAANSUhEUgAAAAUA...
  ```
- `image_list`: Incorrect Base64 format (with data: prefix):
  ```plaintext
  data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA...
  ```
- `image_list`: Supported image formats: .jpg / .jpeg / .png
- `image_list`: Image file size must not exceed 10MB. Image dimensions must be at least 300px. Aspect ratio must be between 1:2.5 and 2.5:1
- `prompt`: Use the format <<<xxx>>> to explicitly refer to a specific video or image, such as <<<video_1>>> or <<<image_1>>>
- `prompt`: To ensure optimal results, the prompt must include references to the video and image(s) required for the editing
- `prompt`: Must not exceed 2,500 characters
- `prompt`: > **Recommended Prompt Templates:**
  >
  > 
  >
  > **Adding Elements:**
  > - EN: Using the context of <<<video_1>>>, seamlessly add [x] from <<<image_1>>>
  > - ZH: 基于<<<video_1>>>中的原始内容，以自然生动的方式，将<<<image_1>>>中的【】，融入<<<video_1>>>的【】
  >
  > 
  >
  > **Replacing Elements:**
  > - EN: swap [x] from <<<image_1>>> for [x] from <<<video_1>>>
  > - ZH: 使用<<<image_1>>>中的【】，替换<<<video_1>>>中的【】
  >
  > 
  >
  > **Removing Elements:**
  > - EN: Delete [x] from <<<video_1>>>
  > - ZH: 删除<<<video_1>>>中的【】
  >
  > 
  >
  > Note: [x] or 【】 are placeholders where you should fill in specific content.
- `negative_prompt`: Must not exceed 2,500 characters
- `mode`: std: Standard mode, basic rendering, cost-effective
- `mode`: pro: Professional mode, high-quality, enhanced rendering, better video output quality
- `duration`: Only 5-second and 10-second videos are supported
- `duration`: To generate a 5-second video, the input video must be ≥2 seconds and ≤5 seconds
- `duration`: To generate a 10-second video, the input video must be ≥7 seconds and ≤10 seconds
- `watermark_info`: Defined by the enabled parameter, format: 
  ```json
    "watermark_info": { "enabled": boolean } 
  ```
- `watermark_info`: true: generate watermarked result, false: do not generate
- `watermark_info`: Custom watermarks are not currently supported
- `callback_url`: For the message schema, refer to the [Callback Protocol](https://kling.ai/document-api/api/get-started/callbacks)
- `external_task_id`: A user-defined task ID; it will not overwrite the system-generated task ID, but can be used to query the task
- `external_task_id`: Please ensure uniqueness of the task ID within a single user account

### Request Example

```bash
curl --request POST \
  --url https://api-singapore.klingai.com/v1/videos/multi-elements \
  --header "Authorization: Bearer ${KLING_API_KEY}" \
  --header 'Content-Type: application/json' \
  --data '{
    "session_id": "847570360458960960",
    "edit_mode": "removal",
    "image_list": [],
    "prompt": "Delete the chick from <<<video_1>>>",
    "negative_prompt": "",
    "mode": "std",
    "duration": "5",
    "callback_url": "",
    "external_task_id": ""
  }'
```

### Response Example

```json
{
  "code": 0, // Error code; Specific definitions can be found in "Error Code"
  "message": "string", // Error message
  "request_id": "string", // Request ID, generated by the system, used for tracking requests and troubleshooting
  "data": {
    "task_id": "string", // Task ID, generated by the system
    "task_status": "string", // Task status, Enum values: submitted, processing, succeed, failed
    "task_info": {
      "external_task_id": "string" // User-defined task ID
    },
    "created_at": 1722769557708, // Task creation time, Unix timestamp, unit: ms
    "updated_at": 1722769557708 // Task update time, Unix timestamp, unit: ms
  }
}
```

---

## Query Task (Single)

### API Overview

- Method: `GET`
- Path: `/v1/videos/multi-elements/{id}`
- Auth: `Authorization: Bearer <API_KEY>`
- Content-Type: `application/json`

### Headers

| Field | Type | Required | Default | Enum | Description |
|---|---|---:|---|---|---|
| `Content-Type` | string | Yes | `application/json` | - | Data Exchange Format |
| `Authorization` | string | Yes | - | - | Authentication information, refer to API authentication |

### Path Params

| Field | Type | Required | Default | Enum | Description |
|---|---|---:|---|---|---|
| `task_id` | string | No | - | - | Task ID for Multi-element Video Editing. Use either task_id or external_task_id as the {id} path parameter; exactly one is required. |
| `external_task_id` | string | No | - | - | Custom Task ID for Multi-element Video Editing. Use either task_id or external_task_id as the {id} path parameter; exactly one is required. |

#### Path Params Field Notes

- `task_id`: Request path parameter, fill the value directly in the request path
- `task_id`: You can choose to query by external_task_id or task_id
- `external_task_id`: The external_task_id filled in when creating the task. You can choose to query by external_task_id or task_id

### Request Example

```bash
curl --request GET \
  --url https://api-singapore.klingai.com/v1/videos/multi-elements/{task_id} \
  --header "Authorization: Bearer ${KLING_API_KEY}"
```

### Response Example

```json
{
  "code": 0, // Error code; Specific definitions can be found in "Error Code"
  "message": "string", // Error message
  "request_id": "string", // Request ID, generated by the system, used for tracking requests and troubleshooting
  "data": {
    "task_id": "string", // Task ID, generated by the system
    "task_status": "string", // Task status, Enum values: submitted, processing, succeed, failed
    "task_status_msg": "string", // Task status message, displays failure reason when task fails (e.g., triggered platform content moderation)
    "task_info": { // Task creation parameters
      "external_task_id": "string" // User-defined task ID
    },
    "task_result": {
      "videos": [
        {
          "id": "string", // Generated video ID, globally unique
          "session_id": "id", // Session ID, generated during video initialization task, remains unchanged during editing operations, valid for 24 hours
          "url": "string", // URL of generated video (Note: For security purposes, generated images/videos will be deleted after 30 days, please save them promptly)
          "watermark_url": "string", // Watermarked video download URL, anti-hotlinking format
          "duration": "string" // Total video duration, unit: s
        }
      ]
    },
    "watermark_info": {
      "enabled": boolean
    },
    "final_unit_deduction": "string", // Final unit deduction for the task
    "final_balance_deduction": { // Balance deduction information
      "quota": "string", // Balance deduction discount price
      "list_price": "string" // Balance deduction list price
    },
    "created_at": 1722769557708, // Task creation time, Unix timestamp, unit: ms
    "updated_at": 1722769557708 // Task update time, Unix timestamp, unit: ms
  }
}
```

---

## Query Task (List)

### API Overview

- Method: `GET`
- Path: `/v1/videos/multi-elements`
- Auth: `Authorization: Bearer <API_KEY>`
- Content-Type: `application/json`

### Headers

| Field | Type | Required | Default | Enum | Description |
|---|---|---:|---|---|---|
| `Content-Type` | string | Yes | `application/json` | - | Data Exchange Format |
| `Authorization` | string | Yes | - | - | Authentication information, refer to API authentication |

### Query Params

| Field | Type | Required | Default | Enum | Description |
|---|---|---:|---|---|---|
| `pageNum` | int | No | `1` | - | Page number |
| `pageSize` | int | No | `30` | - | Number of items per page |

#### Query Params Field Notes

- `pageNum`: Value range: [1, 1000]
- `pageSize`: Value range: [1, 500]

### Request Example

```bash
curl --request GET \
  --url 'https://api-singapore.klingai.com/v1/videos/multi-elements?pageNum=1&pageSize=30' \
  --header "Authorization: Bearer ${KLING_API_KEY}"
```

### Response Example

```json
{
  "code": 0, // Error code; Specific definitions can be found in "Error Code"
  "message": "string", // Error message
  "request_id": "string", // Request ID, generated by the system, used for tracking requests and troubleshooting
  "data": [
    {
      "task_id": "string", // Task ID, generated by the system
      "task_status": "string", // Task status, Enum values: submitted, processing, succeed, failed
      "task_status_msg": "string", // Task status message, displays failure reason when task fails (e.g., triggered platform content moderation)
      "task_info": { // Task creation parameters
        "external_task_id": "string" // User-defined task ID
      },
      "task_result": {
        "videos": [
          {
            "id": "string", // Generated video ID, globally unique
            "session_id": "id", // Session ID, generated during video initialization task, remains unchanged during editing operations, valid for 24 hours
            "url": "string", // URL of generated video (Note: For security purposes, generated images/videos will be deleted after 30 days, please save them promptly)
            "watermark_url": "string", // Watermarked video download URL, anti-hotlinking format
            "duration": "string" // Total video duration, unit: s
          }
        ]
      },
      "watermark_info": {
        "enabled": boolean
      },
      "final_unit_deduction": "string", // Final unit deduction for the task
      "final_balance_deduction": { // Balance deduction information
        "quota": "string", // Balance deduction discount price
        "list_price": "string" // Balance deduction list price
      },
      "created_at": 1722769557708, // Task creation time, Unix timestamp, unit: ms
      "updated_at": 1722769557708 // Task update time, Unix timestamp, unit: ms
    }
  ]
}
```
