跳转到内容
打开 Castaly控制台

视频

kling-2.5-turbo API

通过 Modelflare 异步视频入口使用精确的 kling-2.5-turbo 模型 ID。

使用精确模型 ID kling-2.5-turbo。请求中的模型名必须与本页完全一致。

示例输出kling-2.5-turboPOST /v1/videos5.0s

请求参数:duration=5resolution=1080pratio=16:9

提示词:One continuous take, no cuts. A night market grill under plastic awnings, skewers over coals. A cook in a lacquer-red jacket fans the fire once and the sparks refuse to die: they climb, gather and turn into a flock of small orange birds that wheels above the stalls and pours down the length of the street. The camera starts tight on the coals, pulls back and rises with the flock over the awnings. One hard warm key from the grill itself, cold blue street beyond. Real weight and inertia, smoke and heat shimmer, no text.

生成该示例的请求
{
"model": "kling-2.5-turbo",
"prompt": "One continuous take, no cuts. A night market grill under plastic awnings, skewers over coals. A cook in a lacquer-red jacket fans the fire once and the sparks refuse to die: they climb, gather and turn into a flock of small orange birds that wheels above the stalls and pours down the length of the street. The camera starts tight on the coals, pulls back and rises with the flock over the awnings. One hard warm key from the grill itself, cold blue street beyond. Real weight and inertia, smoke and heat shimmer, no text.",
"seconds": "5",
"duration": 5,
"resolution": "1080p",
"ratio": "16:9",
"aspect_ratio": "16:9"
}

使用 Modelflare API Key,通过 https://modelflare.dev/v1 发送请求。网关入口为 POST /v1/videos。

HTTP
Authorization: Bearer YOUR_MODELFLARE_API_KEY
终端窗口bash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model_name": "kling-2.5-turbo",
"prompt": "一只白猫在雨夜霓虹街道上奔跑,电影感跟拍",
"duration": "5", "mode": "std"
}'

提交成功后保存任务 ID。使用 GET /v1/videos/{task_id} 轮询,完成后使用 GET /v1/videos/{task_id}/content 下载;结果地址可能过期,应及时转存。

终端窗口bash
curl https://modelflare.dev/v1/videos/TASK_ID \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY"

Kling 按模型族使用 model_name、prompt、mode、duration、image_list 或 contents / settings;原生 JSON 会保留并转发。

Kling Legacy 使用 model_name 和统一的 text2video / image2video 请求结构。具体模式、分辨率和音频档位以当前模型的官方页面与价格页为准。

字段 必填 说明
model_name 是 kling-2.5-turbo
prompt 条件 文生视频必填;图生视频可与图片组合
image 条件 首帧图片 URL 或 Base64
image_tail 否 可选尾帧图片
video_url 条件 Kling 3.0 motion-control 的参考视频
image_list 否 Omni/O1 或多媒体工作流中的图片列表
negative_prompt 否 负向提示词
mode 否 std / pro / 4k(视模型而定)
duration 否 5 / 10(字符串)
multi_shot 否 是否启用多镜头分镜
sound 否 支持时生成同步音效
camera_control 否 运镜控制(模型支持时)

Kling 2.5 Turbo 使用 Legacy API,固定 5/10 秒和 720p/1080p;支持文生视频与单首帧图生视频,不支持原生音频、指定声音、多镜头、motion brush 或 camera control。

Legacy 模型根据工作流选择 model_name、首帧/尾帧或 motion-control 字段;固定时长和音频限制以本页表格为准。

终端窗口bash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model_name": "kling-2.5-turbo", "prompt": "一只狗在海边奔跑",
"duration": "5", "mode": "pro", "aspect_ratio": "16:9", "sound": "off"
}'

参数不符合模型契约时,创建接口会返回带 request ID 的 4xx。异步任务也可能在创建成功后进入 failed;轮询响应中的 error_code 和 error_message 才是该任务的最终原因。不要把同一请求改成另一种 JSON 结构重试。

本页只覆盖 Modelflare 的模型生成/编辑调用。搜索或地图增强、声音管理、元素库管理等资源型接口不属于本页的公开调用范围,也不需要作为模型请求字段传入。

本模型按视频秒计费。请查看模型价格页查看当前销售价、参考原价和完整规格。

媒体契约 · v1

契约 ID: media.kling-2-5-turbo.v1Adapter: video.kling.legacy.v1@v1指纹: 3126429a6aaf524dc6fef7239bd78c28eba3d8c07dd9259c85ee8e422bebe2c6

官方来源: Kuaishou Kling

契约参数

Intent 字段控件选项
ratioselect16:9 / 9:16 / 1:1
resolutionselect720p / 1080p
durationselect5 / 10

支持能力

  • allowed_values · ratio · 16:9, 9:16, 1:1
  • allowed_values · resolution · 720p, 1080p
  • allowed_values · duration · 5, 10
  • max_assets · reference_asset_ids · 2

结构化请求示例

text

Intent

{
  "duration": 5,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "ratio": "16:9",
  "resolution": "720p"
}

上游请求

{
  "aspect_ratio": "16:9",
  "duration": "5",
  "mode": "std",
  "model_name": "kling-2.5-turbo",
  "prompt": "A red paper kite over a quiet harbour at dusk."
}

reference

Intent

{
  "duration": 5,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "ratio": "16:9",
  "resolution": "720p"
}

上游请求

{
  "aspect_ratio": "16:9",
  "duration": "5",
  "image": "https://example.com/reference.png",
  "mode": "std",
  "model_name": "kling-2.5-turbo",
  "prompt": "A red paper kite over a quiet harbour at dusk."
}