Skip to main content
Kling tasks are asynchronous. Create a task, persist its public GENGEN id, and poll the retrieve endpoint until the normalized status is terminal.

Error compatibility

GENGEN keeps its standard error envelope even when Kling rejects the upstream request:
Use the HTTP status and GENGEN error_code for application logic. upstreamCode is diagnostic and can be used to distinguish the following Kling categories.
Never branch on provider message text. It can change independently of the GENGEN API.

Callback protocol

GENGEN registers its own callback URL with Kling and verifies every event before updating a task or settling its wallet hold. Callback verification covers the exact raw body and the webhook-id, webhook-timestamp, and webhook-signature headers. Events outside a five-minute timestamp window are rejected, and multiple v1 signatures are accepted during secret rotation. This provider callback is an internal GENGEN integration surface; it is not a customer webhook. Applications should continue polling the public task endpoint. Callback processing and polling share the same idempotent task ID, so either path can safely observe the terminal result first.
Kling output URLs are retained by the provider for a limited period. Copy successful videos to storage you control when you need durable access.

Unsupported task deletion

The current Kling 3.0 task API does not expose cancellation or deletion. Calling the shared DELETE /contents/generations/tasks/{id} route for a Kling task returns provider.operation_not_supported; it does not release an active hold or pretend the remote task was cancelled.