Video Generation
Kling 4.0
Text-to-video, first/last/keyframe animation, multimodal reference, editing and extension, always with stereo audio.
POST
Kling 4.0
Text-to-video, first/last/keyframe animation, multimodal reference, editing and extension, always with stereo audio.
Submission returns a task_id. Use
Quick start
GET /v1/tasks/{task_id} to poll the result. Reference assets must use publicly downloadable URLs.
Parameters
Legacy mode, negative_prompt, multi_shot, multi_prompt, element_list, video_list, camera_control and voice_list are unsupported. Input videos must be directly readable and at least one second long. Image roles and combined assets must also satisfy supplier validation.
Edit a video
Extend a video
Billing and results
Fixed per-second prices apply. Reservation and settlement use the tariff and measured media facts frozen at submission. Ordinary generation bills output seconds; extension bills only the new segment. Editing and video-reference generation bill output seconds + max(output seconds, billed input seconds). Raw input clip durations are summed, rounded up once, then capped at 30 seconds. Failed video probes are rejected before reservation.
When editing with omitted
duration or 0, the measured source duration rounded up determines both reservation and settlement, without a 30-second upper-bound hold. A 3.04-second source produces 4 billable output seconds: 4 + max(4, 4) = 8 seconds, so both the 720p reservation and successful charge are $0.756. Container tail-frame padding does not add another billable second. Existing tasks retain their frozen tariff.
Read current rates in the model market or price_config from GET /v1/models. Images are in result.images and videos in result.videos; url is an array. Failed or cancelled tasks receive a full reservation refund. Read final cost in integer quota (500,000 quota = 1 USD) and confirm billing_status is settled.
For callbacks, waiting, idempotency and spending limits, see Submit a task。