AI 图片生成API
Kerox 上目前在线的全部图片模型。同一个任务接口,模型 ID 用表里的那一列。
# 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/seedream-5.5",
"input": {
"prompt": "minimalist ceramic vase on warm limestone in morning light"
}
}' | 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/seedream-5.5",
"status": "succeeded",
"outputs": [ { "type": "image", "url": "https://cdn.kerox.ai/t/task_01JD8X9B…/0.png" } ],
"cost": { "amount": "0.0160", "currency": "USD", "status": "settled" }
}示例用提示词创建一个任务。只把模型 ID 换成接受同样字段的一行。
三步接入
输出示例。
表里这些模型已经存好的示例。这个页面不会发起一次生成。
模型和 API 价格
所有线上模型都通过同一个 POST /v1/tasks 接口调用。
划掉的数字是该模型上登记的厂商牌价,旁边是 Kerox 当前公开价。两个数字都在页面渲染时从目录读取。



