> ## 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":"queued","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}`

    ### Request headers

    <ParamField header="Authorization" type="string" required>Bearer authentication in the form `Bearer YOUR_API_KEY`.</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>Data exchange format. Use `application/json`.</ParamField>

    ### Path parameters

    <ParamField path="task_id" type="string" required>Text-to-video task ID returned by the create endpoint.</ParamField>

    ```bash cURL theme={null}
    curl --request GET \
      --url https://www.anyfast.ai/kling/v1/videos/text2video/TASK_ID \
      --header 'Authorization: Bearer YOUR_API_KEY' \
      --header 'Content-Type: application/json'
    ```
  </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":"queued","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}`

    ### Request headers

    <ParamField header="Authorization" type="string" required>Bearer authentication in the form `Bearer YOUR_API_KEY`.</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>Data exchange format. Use `application/json`.</ParamField>

    ### Path parameters

    <ParamField path="task_id" type="string" required>Image-to-video task ID returned by the create endpoint.</ParamField>

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

## Task result

`data.task_status` is `submitted`, `processing`, `succeed`, or `failed`. When the task succeeds, `data.task_result.videos[]` contains the temporary result `url` and actual `duration`.

<ResponseField name="code" type="integer">`0` indicates that the query was accepted.</ResponseField>
<ResponseField name="message" type="string">Error information; empty for a successful query.</ResponseField>
<ResponseField name="data.task_id" type="string">Queried task ID.</ResponseField>
<ResponseField name="data.task_status" type="string">`submitted`, `processing`, `succeed`, or `failed`.</ResponseField>
<ResponseField name="data.task_status_msg" type="string">Failure details when the task fails.</ResponseField>
<ResponseField name="data.task_result.videos" type="object[]">Generated videos, returned after success.</ResponseField>
<ResponseField name="data.task_result.videos[].url" type="string">Temporary generated-video URL.</ResponseField>
<ResponseField name="data.task_result.videos[].duration" type="string">Actual duration in seconds.</ResponseField>
<ResponseField name="data.created_at" type="integer">Creation Unix timestamp in milliseconds.</ResponseField>
<ResponseField name="data.updated_at" type="integer">Last update Unix timestamp in milliseconds.</ResponseField>

```json 200 theme={null}
{
  "code": 0,
  "message": "",
  "data": {
    "task_id": "asyntask_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "task_status": "succeed",
    "task_result": {"videos": [{"url": "https://example.com/result.mp4", "duration": "5"}]},
    "created_at": 1784720890000,
    "updated_at": 1784720949000
  }
}
```

<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" />
