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

# kling-v2-5-turbo

> Kling 2.5 Turbo text-to-video and image-to-video Legacy APIs.

<Tabs>
  <Tab title="Text to Video">
    ## Create task

    `POST /kling/v1/videos/text2video`

    <div className="kling-api-example-panel">
      ```bash cURL theme={null}
      curl --request POST \
        --url https://www.anyfast.ai/kling/v1/videos/text2video \
        --header 'Authorization: Bearer YOUR_API_KEY' \
        --header 'Content-Type: application/json' \
        --data '{
          "model_name": "kling-2.5-turbo",
          "prompt": "A paper boat crosses a rain-covered street",
          "negative_prompt": "blurry, distorted",
          "duration": "5",
          "mode": "std",
          "aspect_ratio": "16:9",
          "watermark_info": {"enabled": false}
        }'
      ```

      ```json 200 theme={null}
      {"id":"860260753860210752","task_id":"860260753860210752","object":"video","model":"kling-v2-5-turbo","status":"","progress":0,"created_at":1773130665}
      ```
    </div>

    ## Request body

    <ParamField body="model_name" type="string" required>Must be `kling-2.5-turbo`.</ParamField>
    <ParamField body="prompt" type="string" required>Positive prompt, up to 2,500 characters.</ParamField>
    <ParamField body="negative_prompt" type="string">Content to avoid, up to 2,500 characters.</ParamField>
    <ParamField body="mode" type="string" default="std">`std` for 720p or `pro` for 1080p.</ParamField>
    <ParamField body="duration" type="string" default="5">`5` or `10` seconds.</ParamField>
    <ParamField body="aspect_ratio" type="string" default="16:9">`16:9`, `9:16`, or `1:1`.</ParamField>
    <ParamField body="watermark_info" type="object">Set `enabled` to request an additional watermarked result.</ParamField>

    ## Query task by ID

    `GET /kling/v1/videos/text2video/{task_id}`

    ```bash cURL theme={null}
    curl --request GET \
      --url https://www.anyfast.ai/kling/v1/videos/text2video/TASK_ID \
      --header 'Authorization: Bearer YOUR_API_KEY'
    ```
  </Tab>

  <Tab title="Image to Video">
    ## Create task

    `POST /kling/v1/videos/image2video`

    <div className="kling-api-example-panel">
      ```bash cURL theme={null}
      curl --request POST \
        --url https://www.anyfast.ai/kling/v1/videos/image2video \
        --header 'Authorization: Bearer YOUR_API_KEY' \
        --header 'Content-Type: application/json' \
        --data '{
          "model_name": "kling-2.5-turbo",
          "image": "https://example.com/start.png",
          "image_tail": "https://example.com/end.png",
          "prompt": "The subject turns toward the window",
          "duration": "5",
          "mode": "pro",
          "watermark_info": {"enabled": false}
        }'
      ```

      ```json 200 theme={null}
      {"id":"860260753860210752","task_id":"860260753860210752","object":"video","model":"kling-v2-5-turbo","status":"","progress":0,"created_at":1773130665}
      ```
    </div>

    ## Request body

    <ParamField body="model_name" type="string" required>Must be `kling-2.5-turbo`.</ParamField>
    <ParamField body="image" type="string" required>Start-frame URL or raw Base64.</ParamField>
    <ParamField body="image_tail" type="string">Optional end frame. This capability requires 1080p `pro` mode.</ParamField>
    <ParamField body="prompt" type="string">Positive prompt, up to 2,500 characters.</ParamField>
    <ParamField body="negative_prompt" type="string">Negative prompt, up to 2,500 characters.</ParamField>
    <ParamField body="mode" type="string" default="std">`std` for 720p or `pro` for 1080p.</ParamField>
    <ParamField body="duration" type="string" default="5">`5` or `10` seconds.</ParamField>
    <ParamField body="watermark_info" type="object">Set `enabled` to request an additional watermarked result.</ParamField>

    ### Image requirements

    Use a public URL or raw Base64 without a data URI prefix. JPG, JPEG, and PNG are supported. Each file must be no larger than 10 MB, both sides must be at least 300 px, and the aspect ratio must be between 1:2.5 and 2.5:1.

    ## Query task by ID

    `GET /kling/v1/videos/image2video/{task_id}`

    ```bash cURL theme={null}
    curl --request GET \
      --url https://www.anyfast.ai/kling/v1/videos/image2video/TASK_ID \
      --header 'Authorization: Bearer YOUR_API_KEY'
    ```
  </Tab>
</Tabs>

## Task result

<ParamField path="task_id" type="string" required>Use the ID returned by the matching create endpoint.</ParamField>

`data.task_status` is `submitted`, `processing`, `succeed`, or `failed`. Failure details are in `data.task_status_msg`. Successful output is in `data.task_result.videos`, where each item contains `id`, `url`, `watermark_url`, and `duration`. Billing details can appear in `final_unit_deduction` and `final_balance_deduction`.

```json 200 theme={null}
{
  "code": 0,
  "message": "SUCCEED",
  "request_id": "request-id",
  "data": {
    "task_id": "task-id",
    "task_status": "succeed",
    "task_status_msg": "",
    "watermark_info": {"enabled": false},
    "task_result": {"videos": [{"id": "video-id", "url": "https://example.com/result.mp4", "watermark_url": "", "duration": "5"}]},
    "final_unit_deduction": "string",
    "final_balance_deduction": {"quota": "string", "list_price": "string"},
    "created_at": 1722769557708,
    "updated_at": 1722769657708
  }
}
```

<Warning>Generated result URLs are removed after 30 days. Save the files promptly.</Warning>

<Note>This page uses Kling Legacy paths. Kling 2.5 Turbo does not support audio, specified voices, multi-shot, motion brush, camera control, or `cfg_scale`.</Note>

<script src="/feedback.js" />
