TL;DR
- 可灵 Kling 3.0 Turbo 文生视频的模型名是
kling-3.0-turbo/text-to-video,是可灵 3.0 的快速档。打开模型页就能在线试。 - 按秒计费:720p 每秒 $0.13,1080p 每秒 $0.16。时长 3–15 秒任意整数,5 秒 720p 一条 $0.65。
- 参数只有 4 个:
prompt、duration、aspect_ratio、resolution。多传任何字段(比如seed、negative_prompt)都会返回 400。
先看一条
720p、5 秒、16:9:
aerial drone shot sweeping over a norwegian fjord waterfall, mist drifting,
camera gliding forward, smooth natural motion, stable cinematic camera
movement, consistent lighting across frames, cinematic composition, dramatic
directional lighting, rich cohesive color grade, ultra-detailed, premium
commercial finish
用这个提示词生成 →(5 秒、720p、16:9)
kling-3.0-turbo/text-to-video,5 秒。
参数速查
| 字段 | 必填 | 取值 | 说明 |
|---|---|---|---|
prompt | 是 | 最长 2500 字符 | 画面、主体、动作、运镜;引号里的台词可对口型 |
duration | 否 | 整数 3–15,默认 5 | 按秒计费,多一秒多一秒的钱 |
aspect_ratio | 否 | 16:9(默认)/ 9:16 / 1:1 | 横屏、竖屏、方形 |
resolution | 否 | 720p(默认)/ 1080p | 决定每秒单价 |
没有 sound 字段,但成片自带声音,关不掉。也没有 4K、尾帧、参考图,要这些,用可灵 3.0 标准版或 Omni。
curl:跑通第一条
curl -X POST https://api.hiapi.ai/v1/tasks \
-H "Authorization: Bearer $HIAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-3.0-turbo/text-to-video",
"input": {
"prompt": "A golden retriever surfing a turquoise wave at sunset, cinematic slow motion, water droplets frozen mid-air",
"duration": 5,
"aspect_ratio": "16:9",
"resolution": "720p"
}
}'
返回里只有 data.taskId。每 5–10 秒轮询一次 GET /v1/tasks/{taskId},status 变成 success 后从 output[0].url 下载视频。
Python:提交、轮询、下载
# pip install requests; export HIAPI_KEY=你的 Key
import os, time, uuid, requests
API = "https://api.hiapi.ai/v1/tasks"
H = {"Authorization": f"Bearer {os.environ['HIAPI_KEY']}"}
def generate(timeout_s=900, **inp):
# 重试同一次提交时复用同一个 Idempotency-Key,只会扣一次费
r = requests.post(API, json={"model": "kling-3.0-turbo/text-to-video", "input": inp},
headers={**H, "Idempotency-Key": str(uuid.uuid4())}, timeout=30)
r.raise_for_status()
task_id = r.json()["data"]["taskId"]
deadline = time.time() + timeout_s
while time.time() < deadline:
d = requests.get(f"{API}/{task_id}", headers=H, timeout=30).json()["data"]
if d["status"] == "success":
return d["output"][0]["url"]
if d["status"] in ("fail", "failed"):
raise RuntimeError(d)
time.sleep(8)
raise TimeoutError(task_id)
# 竖屏 3 秒 720p 试方向,$0.39
url = generate(
prompt="A barista pours latte art in slow motion, close-up, warm cafe light",
duration=3, aspect_ratio="9:16", resolution="720p",
)
with open("clip.mp4", "wb") as f:
f.write(requests.get(url).content)
多少钱
| 时长 | 720p($0.13/秒) | 1080p($0.16/秒) |
|---|---|---|
| 3 秒(最短) | $0.39 | $0.48 |
| 5 秒 | $0.65 | $0.80 |
| 10 秒 | $1.30 | $1.60 |
| 15 秒(最长) | $1.95 | $2.40 |
HiAPI 现价,2026 年 10 月 18 日核对。
失败不扣费。完整对比见 可灵 3.0 Turbo API 价格。
你会碰到的报错
| 你传了什么 | 返回 |
|---|---|
没传 prompt | 400,missing required field "prompt" |
多传字段(如 seed、negative_prompt) | 400,additional properties ... not allowed |
duration: 2 | 400,duration: minimum: got 2, want 3 |
duration: 99 | 400,duration: maximum: got 99, want 15 |
aspect_ratio: "4:3" | 400,只能是 16:9、9:16、1:1 |
resolution: "480p" | 400,只能是 720p、1080p |
| Key 错误或缺失 | 401,permission_denied |
| 余额不足 | 402,先充值再排查 |
参数错误在提交时就同步返回;生成失败是之后轮询到 status 为 fail,错误在 data.error 里。两条路都要处理。
上线前注意
- 用回调代替轮询:在
input同级加"callback": {"url": "https://your-app.example.com/hiapi/callback", "when": "final"},任务结束只通知一次,按taskId去重。 - 带上
Idempotency-Key请求头:超时重试时用同一个 Key,只会建一个任务、扣一次费。 - 结果马上下载:
output[0].url有有效期。 - 超过 15 秒就分段:把上一条的最后一帧传给
kling-3.0-turbo/image-to-video当首帧,接着生成。
常见问题
一条要多久?
按分钟算,时长越长、分辨率越高越久。轮询上限建议 10–15 分钟,或者直接用回调。
支持负面提示词吗?
不支持。要避开的东西直接写进提示词,比如「no text overlays, no watermarks」。
Turbo 和可灵 3.0 标准版怎么选?
Turbo 是速度档,自带声音;标准版不开声音的 720p 每秒 $0.10 更便宜,声音可开可关,还能出 4K。同提示词对照见 可灵 3.0 Turbo vs 可灵 3.0。
复制上面的峡湾提示词,花 $0.39 生成一条 3 秒测试。




