Kling 3.0 Turbo API 参数文档
Kling 3.0 Turbo 是快手可灵 Kling 3.0 的 Turbo 档,每条视频都同时生成声音。在 APIMODELS 上它是统一视频端点里的一个模型名 kling-3.0-turbo(kling-3-0-turbo、kling-v3-turbo 也能用),两种用法:只写提示词就是文生视频,传一张首帧就是图生视频。3-15 秒,720p 或 1080p,多镜头写在提示词里。按输出秒数计费,720p 每秒 $0.112、1080p 每秒 $0.14,只在生成成功时扣费。
价格
| 分辨率 | 每输出秒(含声音) |
|---|---|
| 720p | $0.112 |
| 1080p | $0.14 |
| 例子:时长 | 分辨率 | 价格 |
|---|---|---|
| 5 秒 | 720p | $0.56 |
| 10 秒 | 1080p | $1.40 |
| 15 秒(最长) | 1080p | $2.10 |
价格 = 每秒单价 × duration。文生和图生同价,提示词长短和镜头数不影响价格。参数不合规的请求在创建时返回 400,不扣费;生成失败不扣费。
认证
所有请求在 Header 携带 API Key:
Authorization: Bearer YOUR_API_KEY创建任务与查询结果
https://api.apimodels.app/v1/video/generations·GET/v1/video/generations?task_id=# Kling 3.0 Turbo — text-to-video (prompt only) or image-to-video (first frame only).
# Native audio is always generated; billed per output second on success:
# 720p $0.112/s, 1080p $0.14/s.
# 1) Text-to-video: prompt is required; aspect_ratio 16:9 (default) | 9:16 | 1:1
curl -X POST https://api.apimodels.app/v1/video/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-3.0-turbo",
"prompt": "A street food vendor flips noodles in a wok at night, steam rising, sizzling sound and crowd chatter",
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9"
}'
# 2) Image-to-video: first_frame_url (image_url / image also work); the clip follows the image's aspect ratio
curl -X POST https://api.apimodels.app/v1/video/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-3.0-turbo",
"first_frame_url": "https://example.com/first-frame.png",
"prompt": "The woman turns toward the camera and says \"We open at nine.\"",
"resolution": "1080p",
"duration": 10
}'
# Response (async — a task is created):
# { "code": 200, "msg": "success", "data": { "taskId": "clxxx", "state": "pending", "model": "kling-3.0-turbo" } }
# Poll every 10-15 s until completed (result files are kept 30 days)
curl "https://api.apimodels.app/v1/video/generations?task_id=TASK_ID" \
-H "Authorization: Bearer YOUR_API_KEY"
# { "code": 200, "data": { "state": "completed",
# "resultUrls": ["https://r2.apimodels.app/videos/clxxx.mp4"] } }任务状态依次是 pending → processing → completed 或 failed。completed 时 data.resultUrls[0] 是 MP4;failed 时原因在 data.failMsg,费用自动退回。每 10-15 秒轮询一次即可。
多镜头:写在提示词里
没有单独的分镜字段,多镜头直接写进 prompt,格式是「shot 序号, 秒数, 这一镜的内容;」。最多 6 镜,每镜至少 1 秒,每镜的描述最多 512 个字符,所有镜头的秒数加起来必须等于 duration。文生和图生都可以这样写。
"prompt": "shot 1, 3, a runner ties her shoes on an empty track at sunrise; shot 2, 2, she sprints past the camera, footsteps and breathing;"
"duration": 5
// shot <number>, <seconds>, <what happens>;
// up to 6 shots, each at least 1 second, each description up to 512 characters,
// and the shot seconds must add up to duration (3 + 2 = 5 here).回调(callback_url)
不想轮询就在创建请求里传 callback_url。任务到达 completed 或 failed 时,我们向这个地址发一个 HTTP POST(JSON)。投递失败会按指数退避重试,30 分钟内持续重试,直到你的接口返回 2xx。回调地址必须公网可达,localhost 和内网地址在创建时就返回 400。轮询接口照常可用。
POST {your callback_url}
Content-Type: application/json
{
"code": 200,
"msg": "success",
"data": {
"taskId": "clxxx...",
"model": "kling-3.0-turbo",
"state": "completed", // or "failed"
"param": "<JSON string>", // your request, JSON.parse once
"resultJson": "<JSON string> | null", // {"resultUrls": ["https://...mp4"]}, JSON.parse once
"failCode": null,
"failMsg": null
}
}参数
| 字段 | 必填 | 类型 | 说明 |
|---|---|---|---|
| model | 是 | string | kling-3.0-turbo(kling-3-0-turbo、kling-v3-turbo 也可) |
| prompt | 文生必填 | string | 文生视频必填,图生视频可选;最多 2500 个字符。多镜头写法见上一节。 |
| first_frame_url | 否 | string | 首帧,公网 URL 或 base64;传了就是图生视频。也接受 image_url、image。只收一张,没有尾帧。 |
| resolution | 否 | string | 720p(默认,每秒 $0.112)或 1080p(每秒 $0.14)。 |
| duration | 否 | integer | 3 到 15 的整数秒,默认 5。 |
| aspect_ratio | 否 | string | 只用于文生视频:16:9(默认)、9:16、1:1。图生视频跟随首帧的比例。 |
| callback_url | 否 | string | 任务完成时我们向该地址 POST 结果;不传就轮询 GET 查询。 |
没有声音开关:每条视频都带同时生成的声音,传 generate_audio: false 会返回 400。也没有 last_frame_url。
输入限制
- 首帧 — JPG、JPEG 或 PNG;不超过 50 MB;宽和高都至少 300 像素;宽高比在 1:2.5 到 2.5:1 之间。只能一张。
- 提示词 — 最多 2500 个字符;多镜头最多 6 镜、每镜至少 1 秒、每镜描述最多 512 个字符,秒数合计等于 duration。
- 时长与画质 — 3-15 秒整数;720p 或 1080p。
- 不支持 — 尾帧(last_frame_url)和关闭声音(generate_audio: false),这两项请用 Kling V3;首帧之外的参考图也不收,只能传一张图。
- 成功率 — 不是每个请求都能出片:内容可能被审核拒绝,也可能遇到上游临时错误。失败的任务不扣费,可以改提示词后重试。
常见报错
参数问题在创建时同步返回 400({"code": 400, "msg": "..."}),不会建任务、不扣费。下表 msg 是当前原文(N、X 为实际值)。
| msg | 原因 / 怎么改 |
|---|---|
prompt is required for text-to-video (or pass first_frame_url for image-to-video) | 既没有提示词也没有首帧。文生视频必须写 prompt;图生视频传 first_frame_url,提示词可省。 |
prompt must be 2500 characters or fewer (got N) | 提示词超过 2500 个字符。 |
Kling 3.0 Turbo takes a single first-frame image (image_urls has more than one) | 只收一张图作首帧。用 first_frame_url 传一张。 |
Kling 3.0 Turbo supports a first frame only; last_frame_url is not supported | 不支持尾帧。去掉 last_frame_url;需要首尾帧请用 Kling V3。 |
resolution must be "720p" or "1080p" (got "X") | resolution 只接受 720p 或 1080p。 |
duration must be an integer from 3 to 15 seconds (got N) | duration 必须是 3 到 15 的整数秒。 |
aspect_ratio must be one of 16:9, 9:16, 1:1 (got "X") | 文生视频的画幅只有 16:9、9:16、1:1。带首帧时画幅跟随图片,不读这个字段。 |
Kling 3.0 Turbo always generates native audio; generate_audio:false is not supported | 声音总是生成,没有关闭开关。要无声视频请用 Kling V3。 |
- 401:API Key 缺失或无效。
- 402:余额不足以支付这条视频(秒数 × 每秒单价)。
- 生成阶段的失败(内容审核拒绝、上游报错、超时)状态为 failed,原因在 data.failMsg,费用自动退回。
说明
- 和 Kling V3(kling-v3)比:Turbo 每条都带声音、没有无声档,也不收尾帧;要无声视频或首尾帧,用 Kling V3。
- 结果文件保留 30 天后自动删除,请及时下载或转存。
- 请只上传你有权使用的图片。
试一试:Playground;用例和价格例子见 Kling 3.0 Turbo 模型页。
相关
常见问题
Kling 3.0 Turbo API 多少钱?
按输出秒计费,含声音:720p 每秒 $0.112,1080p 每秒 $0.14。720p 5 秒 $0.56,1080p 10 秒 $1.40,1080p 15 秒 $2.10。只有生成成功才扣费。
Kling 3.0 Turbo 图生视频怎么调?
POST /api/v1/video/generations,model 填 kling-3.0-turbo,first_frame_url(image_url、image 也行)传一张 JPG 或 PNG,宽高都至少 300 像素;提示词可省,画幅跟随图片。然后轮询 GET /api/v1/video/generations?task_id= 直到 completed。
Kling 3.0 Turbo 的多镜头提示词怎么写?
直接写在 prompt 里:shot 1, 3, 这一镜的内容; shot 2, 2, 这一镜的内容;。最多 6 镜,每镜至少 1 秒、描述最多 512 个字符,所有镜头秒数加起来等于 duration。
Kling 3.0 Turbo 和 Kling V3 有什么区别?
Kling 3.0 Turbo 每条都带声音,只收首帧:传 generate_audio: false 或 last_frame_url 都会返回 400。要无声视频或首尾帧,请用 kling-v3。