> ## 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 2.5 Turbo

> 通过 AnyFast 升级后的 v2 文生视频和图生视频接口调用 Kling 2.5 Turbo。

Kling 2.5 Turbo 使用升级后的 Kling v2 接口。模型由 URL 路径选择，请求体不要填写 `model_name`，也不要继续使用旧版扁平字段。

## 能力

* **文生视频** — 根据提示词生成 5 秒或 10 秒视频。
* **图生视频** — 使用首帧图片和提示词生成视频。
* **查询任务** — 通过统一 v2 任务接口查询结果。

| 能力 | 接口 | 主要输入 |
| - | - | - |
| 文生视频 | `POST /kling/v2/text-to-video/kling-2.5-turbo` | `prompt` |
| 图生视频 | `POST /kling/v2/image-to-video/kling-2.5-turbo` | 含提示词和首帧的 `contents` |
| 查询任务 | `GET /kling/v2/tasks?task_ids=TASK_ID` | 系统任务 ID |

## 文生视频

```bash cURL theme={null}
curl --request POST \
  --url https://www.anyfast.ai/kling/v2/text-to-video/kling-2.5-turbo \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "prompt": "一艘纸船穿过雨后的街道",
    "settings": {"resolution": "720p", "duration": 5, "aspect_ratio": "16:9"}
  }'
```

## 图生视频

```bash cURL theme={null}
curl --request POST \
  --url https://www.anyfast.ai/kling/v2/image-to-video/kling-2.5-turbo \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "contents": [
      {"type": "prompt", "text": "人物转身看向窗外"},
      {"type": "first_frame", "url": "https://example.com/frame.png"}
    ],
    "settings": {"resolution": "720p", "duration": 5}
  }'
```

v2 创建响应在 `data.id` 中返回系统任务 ID，初始状态为 `submitted`。调用 `GET /kling/v2/tasks?task_ids=TASK_ID`，状态为 `succeeded` 后从 `data[].outputs[]` 读取视频。

> [!NOTE]
>
> 此模型的 `settings.duration` 支持 5 或 10，类型为数字。不要使用旧版 `mode`、`model_name`、顶层字符串 `duration` 或 `image` 字段。

## 参数与能力说明

* `settings.resolution` 支持 `720p` 或 `1080p`；`settings.duration` 使用数字并支持 `5` 或 `10`。
* `settings.aspect_ratio` 支持 `16:9`、`9:16` 或 `1:1`。
* 图生视频使用 `first_frame` 内容项；所选高分辨率工作流支持时可以使用 `last_frame`。
* 该模型面向视觉生成，不提供原生音频、音色引用、多镜头分镜、镜头控制和运动笔刷。

> [card] [Kling 2.5 Turbo API 参考](https://docs.anyfast.ai/zh/api-reference/model-api/kling/kling-2.5-turbo.md)
>
> 查看 v2 请求和响应字段。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.