KlingAPI
Live Kling video and Kling Image models share one task endpoint. The table reads both rates from the catalog.
# 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": "kuaishou/kling-4.0",
"input": {
"prompt": "a paper boat on a rainy street, dusk",
"resolution": "720p",
"duration": 5
}
}' | 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": "kuaishou/kling-4.0",
"status": "succeeded",
"outputs": [ { "type": "video", "url": "https://cdn.kerox.ai/t/task_01JD8X9B…/0.mp4" } ],
"cost": { "currency": "USD", "status": "settled" }
}This sample is a video request at 720p for 5 seconds. Replace the model id with a video row. An image row rejects duration.
# 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": "kuaishou/kling-image-4.0",
"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": "kuaishou/kling-image-4.0",
"status": "succeeded",
"outputs": [ { "type": "image", "url": "https://cdn.kerox.ai/t/task_01JD8X9B…/0.png" } ],
"cost": { "amount": "0.0567", "currency": "USD", "status": "settled" }
}Kling Image models take a prompt and do not take duration. Copy this request for an image row.
Three steps to integrate.
- 01
Get an API key
Sign in to the console, create a key, and top up from $5.
Quickstart - 02
Submit a task
Send POST /v1/tasks with the model ID and unified input parameters.
Tasks & polling - 03
Poll or wait for a webhook
Poll GET /v1/tasks/{id} until it finishes, or pass webhook_url to receive the result.
Webhooks
Output samples.
Stored samples for the models in the table. This page does not run a generation.
Models and API pricing.
Every live model is available through the same POST /v1/tasks endpoint.
A struck-through figure is the maker list rate stored on that model. The figure next to it is the current Kerox public rate. Both are read from the catalog as the page renders.
Related pages.
Questions
Not answered here?
Which Kling models are on this page?
Live Kling video and Kling Image models. The full set is on the models page.
Is this the maker's own API host?
No. You call Kerox at POST /v1/tasks and pass a Kling model id from the table.
How do I compare the two prices?
The struck-through figure is the maker list rate. The other figure is the Kerox public rate. Both come from the catalog.
Do I pay when a Kling task fails?
No. The hold is released in full. See pricing and billing.
Where is the parameter list?
On each model's page in docs models, linked from the table.


