kling-4.0 is the new-generation video model Kling AI (Kuaishou) launched in October 2026, aimed at professional-grade video creation: a single generation produces a long take of up to 30 seconds for continuous storytelling, with better motion continuity in fast action and complex camera work. Picture and sound are created together; it supports text-to-video, image-to-video from a first frame, and first-and-last-frame generation. Native output is 720P / 1080P, with 2K / 4K upscaled output available. For multiple reference images, reference videos, reference audio or video editing, use Kling 4.0 Omni.
- Long clips: 3–30 seconds in a single generation, no stitching.
- Native synchronised audio: every video comes with sound generated together with the picture.
- Resolution: native 720P / 1080P, upscaled 2K / 4K.
- Aspect ratios: 16:9, 9:16, 1:1, 21:9.
- Modes: text-to-video, image-to-video (first frame), first-and-last-frame.
Capabilities
Endpoints
The API is asynchronous: create a task, poll it, and download the video fromvideo_url when it completes. Set model to kling-4.0 and put every generation parameter inside input.
Quick start
Create a task to get atask_id, poll every 10–15 seconds, and download video_url once status is completed. $DREAMTO_API_KEY is your API Key.
Generation modes
Text-to-video
A prompt only;aspect_ratio sets the frame.
cURL
Image-to-video (first frame)
image_url is the first frame of the video; the output follows the image.
cURL
First and last frame
Sendimage_url and last_frame_url together; the video transitions from the first frame to the last.
cURL
4K portrait, long clip
A 15-second 9:16 portrait video in one generation, upscaled to 4K.cURL
Parameters
All parameters below go insideinput in the request body.
See Create a video task for the full request and response definitions.
Response and task status
Creating a task returnstask_id, status, model, created_at and request_id. Querying it additionally returns completed_at (once finished), video_url (on success) and error (on failure).
Query response of a completed task:
Pricing
Billed per second of output video at the price of the chosen resolution.
These are list prices; the model price shown in the console is authoritative. Failed tasks and invalid requests are not charged.
Limits and notes
video_urlis valid for 7 days after the task completes; download the video and keep it in your own storage.- Input media must be publicly downloadable URLs; media hosted outside mainland China works as well.
- Every generated video includes audio; this model has no parameter to turn it off.
last_frame_urlmust be sent together withimage_url; with a first frameaspect_ratiohas no effect and the output follows the image.- 2K and 4K are upscaled output and are billed at the price of that resolution.
- A failed task returns
status: "failed"with the reason inerror.message(for exampleInvalidParameterValue: Please input the ImageURL that can be retrieved from the external network.) and is not charged. - When a task is created, the estimated price of the request (resolution price × duration) is reserved from the balance and settled to the actual usage when the task completes. With an insufficient balance the create request returns HTTP 402 (
insufficient_balance) and no task is created. - An invalid request returns HTTP 400; no task is created and nothing is charged. When the duration or a media count is out of range, the message names the field and the allowed range (in the form
input.duration must be a number between <min> and <max>). When an enum parameter such asresolutionoraspect_ratiohas a value outside its allowed list, the message is generic and does not name the field, so check the request against the parameter table. Media formats and content are checked by the model: a violation ends the task asfailed, also without a charge. - A video takes several minutes; poll the task every 10–15 seconds, not faster.

