Generate videos

Create and retrieve asynchronous video generations

Create a generation

POST /v1/videos/generations returns HTTP 202.

FieldTypeRequiredDescription
modelstringyesStable model ID from GET /v1/models
promptstringyes1–5,000 characters
image_urlHTTPS URLnoEnables image-to-video
durationintegerno5 by default; model-dependent
aspect_ratiostringno16:9 by default
negative_promptstringnoUp to 2,000 characters
webhook_urlHTTPS URLnoCompletion callback destination
metadataobjectnoString-to-string values returned with task input

Send a unique Idempotency-Key header (maximum 191 characters) for every logical request. Retrying with the same key returns the original task without charging credits again.

Input requirements are model-specific. Kling 2.1 Standard requires image_url; Kling 2.1 Master also supports text-only requests. Read the live inputs array from GET /v1/models before submitting.

Retrieve a generation

GET /v1/videos/generations/{id} returns only tasks owned by the current API key's account.

Possible statuses are pending, processing, success, failed, and canceled. On success, output is an array of objects containing a url and, when available, thumbnail_url. On failure, the response includes an error object and reserved credits are restored.