图生视频API
在 first_frame 里传一个 https 图片地址,再加上提示词。示例地址是 Kerox 已有的文件。
# 1. Submit a task (optional: add "webhook_url" with your own HTTPS endpoint)
TASK_ID=$(curl -sS --fail-with-body https://api.kerox.ai/v1/tasks \
-H "Authorization: Bearer $KEROX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/seedance-2.5",
"input": {
"prompt": "A lighthouse beam sweeps slowly across the waves",
"resolution": "480p",
"duration": 5,
"first_frame": "https://cdn.kerox.ai/assets/samples/seedream-5.5/lighthouse-blue-hour.webp"
}
}' | jq -r .id)
# 2. Poll until status is "succeeded" or "failed" (up to 10 min)
for _ in $(seq 1 200); do
TASK=$(curl -sS --fail-with-body "https://api.kerox.ai/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $KEROX_API_KEY")
STATUS=$(echo "$TASK" | jq -r .status)
[ "$STATUS" != "processing" ] && break
sleep 3
done
echo "$TASK"
[ "$STATUS" = "succeeded" ] || exit 1# 3. The same object comes back when you poll, and in your webhook
{
"id": "task_01JD8X9B4Q2M7T8N3K5P6R1S0V",
"object": "task",
"model": "bytedance/seedance-2.5",
"status": "succeeded",
"outputs": [ { "type": "video", "url": "https://cdn.kerox.ai/t/task_01JD8X9B…/0.mp4" } ],
"cost": { "amount": "0.4883", "currency": "USD", "status": "settled" }
}示例在 first_frame 里传一张你自己托管的图片地址。示例里的地址是 Kerox 已有的文件。
三步接入
输出示例。
表里这些模型已经存好的示例。这个页面不会发起一次生成。

首帧
首帧
首帧
首帧
模型和 API 价格
所有线上模型都通过同一个 POST /v1/tasks 接口调用。
划掉的数字是该模型上登记的厂商牌价,旁边是 Kerox 当前公开价。两个数字都在页面渲染时从目录读取。