Kling 4.0 Omni

kling-4.0-omni
VideoKlingKling 4.0 Omnikling-4.0-omni

kling-4.0-omni brings Kling 4.0's Omni Reference to the API: images, videos and audio are combined in one generation to keep characters, scenes and voices consistent. Besides the prompt it takes up to 10 images, 5 video clips and 3 audio clips as references and produces a 3–30 second video with synchronised audio in one generation; it can also edit an existing video. A reference video is used either as a feature reference (feature) or as the video to edit (base), and its original sound can be kept. For plain text-to-video, first-frame or first-and-last-frame generation, use Kling 4.0.

Authentication

Base URL
https://api.dreamto.ai
Authorization
Authorization: Bearer YOUR_API_KEY
Content-Type
application/json
Model name (model)
kling-4.0-omni
  • Multimodal references: up to 10 images, 5 video clips (3–30 seconds each, 30 seconds in total) and 3 audio clips, in any combination.
  • Video editing: use the reference video as the video to edit (base) and change it with the prompt.
  • Feature reference: use the reference video as a feature reference (feature) for a new video.
  • Original sound: keep_original_sound keeps or drops the sound of the reference video.
  • Specs: 3–30 seconds, native 720P / 1080P, upscaled 2K / 4K, aspect ratios 16:9, 9:16, 1:1, 21:9.

Capabilities

ModeParametersNotes
Reference imagesprompt + reference_image_urlsUp to 10 images
Feature reference videoprompt + reference_video_urls, reference_video_type set to featureUp to 5 clips, 3–30 seconds each, 30 seconds in total
Video editingprompt + reference_video_urls, reference_video_type set to basekeep_original_sound keeps the original sound
Reference audioAdd reference_audio_urls to any request aboveUp to 3 mp3 clips

Endpoints

The API is asynchronous: create a task, poll it, and download the video from video_url when it completes. Set model to kling-4.0-omni and put every generation parameter inside input.

EndpointPurpose
POST /v1/videosCreate a video task
GET /v1/videos/{task_id}Query a video task

Quick start

Create a task to get a task_id, poll every 10–15 seconds, and download video_url once status is completed. $DREAMTO_API_KEY is your API Key.

cURLbash
# 1. Create the task
curl -X POST "https://api.dreamto.ai/v1/videos" \
  -H "Authorization: Bearer $DREAMTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-4.0-omni",
    "input": {
      "prompt": "The girl from the first image and the fox from the second image walk together through a snowy forest, cinematic",
      "reference_image_urls": [
        "https://your-cdn.example.com/girl.png",
        "https://your-cdn.example.com/fox.png"
      ],
      "resolution": "1080P",
      "duration": 5,
      "aspect_ratio": "16:9"
    }
  }'

# 2. Query the task
curl "https://api.dreamto.ai/v1/videos/job_02b88886c4fda5be35baff61" \
  -H "Authorization: Bearer $DREAMTO_API_KEY"

Generation modes

Reference images

Send several reference images and say in the prompt what each one is for.

cURLbash
curl -X POST "https://api.dreamto.ai/v1/videos" \
  -H "Authorization: Bearer $DREAMTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-4.0-omni",
    "input": {
      "prompt": "The girl from the first image and the fox from the second image walk together through a snowy forest, cinematic",
      "reference_image_urls": [
        "https://your-cdn.example.com/girl.png",
        "https://your-cdn.example.com/fox.png"
      ],
      "resolution": "1080P",
      "duration": 5,
      "aspect_ratio": "16:9"
    }
  }'

Reference image and audio

A reference image plus reference audio, with 21:9 ultra-wide output.

cURLbash
curl -X POST "https://api.dreamto.ai/v1/videos" \
  -H "Authorization: Bearer $DREAMTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-4.0-omni",
    "input": {
      "prompt": "The girl from the reference image speaks to the camera with the voice of the reference audio, on a beach at dusk",
      "reference_image_urls": [
        "https://your-cdn.example.com/girl.png"
      ],
      "reference_audio_urls": [
        "https://your-cdn.example.com/voice.mp3"
      ],
      "resolution": "720P",
      "duration": 5,
      "aspect_ratio": "21:9"
    }
  }'

Feature reference video

reference_video_type set to feature: the video is a feature reference for a new video. Requests with a reference video are billed at the with-reference-video price.

cURLbash
curl -X POST "https://api.dreamto.ai/v1/videos" \
  -H "Authorization: Bearer $DREAMTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-4.0-omni",
    "input": {
      "prompt": "Follow the camera movement of the reference video to film a red sports car driving along a desert road",
      "reference_video_urls": [
        "https://your-cdn.example.com/reference.mp4"
      ],
      "reference_video_type": "feature",
      "resolution": "720P",
      "duration": 5
    }
  }'

Video editing

reference_video_type set to base: the video is edited as the prompt says; keep_original_sound: true keeps its sound.

cURLbash
curl -X POST "https://api.dreamto.ai/v1/videos" \
  -H "Authorization: Bearer $DREAMTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-4.0-omni",
    "input": {
      "prompt": "Change the season in the video from summer to a snowy winter; keep the people and their motion unchanged",
      "reference_video_urls": [
        "https://your-cdn.example.com/reference.mp4"
      ],
      "reference_video_type": "base",
      "keep_original_sound": true,
      "resolution": "720P",
      "duration": 5
    }
  }'

Parameters

All parameters below go inside input in the request body.

ParameterTypeRequiredDefaultValuesDescription
promptstringYes——The prompt (required): describes the video and says how each reference is used.
reference_image_urlsstring[]No—Up to 10 itemsPublic URLs of the reference images, up to 10. jpeg / jpg / png, up to 10MB each.
reference_video_urlsstring[]No—Up to 5 itemsPublic URLs of the reference videos, up to 5 clips. mp4 / mov, 3–30 seconds each and 30 seconds in total. With a reference video the request is billed at the with-reference-video price; the billable duration is the reference video duration plus the output duration (when the reference video is longer than the output) or twice the output duration.
reference_video_typestringNo—feature / baseHow the reference video is used. Only applies when reference_video_urls is sent.
keep_original_soundbooleanNo—true / falseWhether to keep the original sound of the reference video. Only applies when reference_video_urls is sent.
reference_audio_urlsstring[]No—Up to 3 itemsPublic URLs of the reference audio clips, up to 3. mp3.
resolutionstringNo720P720P / 1080P / 2K / 4KOutput resolution. Defaults to 720P.
durationintegerNo53–30Output duration in seconds, an integer from 3 to 30. Defaults to 5.
aspect_ratiostringNo—16:9 / 9:16 / 1:1 / 21:9Output aspect ratio.

See Create a video task for the full request and response definitions.

Response and task status

Creating a task returns task_id, status, model, created_at and request_id. Querying it additionally returns completed_at (once finished), video_url (on success) and error (on failure).

statusMeaning
queuedWaiting in the queue.
in_progressBeing generated.
completedFinished; download the video from video_url.
failedFailed; see error for the reason. Not charged.

Query response of a completed task:

JSONjson
{
  "task_id": "job_02b88886c4fda5be35baff61",
  "status": "completed",
  "model": "kling-4.0-omni",
  "created_at": 1794846663,
  "completed_at": 1794847019,
  "request_id": "req_6a9a539502118ba1c33f1bfc",
  "video_url": "https://cdn.example.com/videos/02b88886c4fda5be35baff61.mp4"
}

Query response of a failed task:

JSONjson
{
  "task_id": "job_02b88886c4fda5be35baff61",
  "status": "failed",
  "model": "kling-4.0-omni",
  "created_at": 1794846663,
  "completed_at": 1794847019,
  "request_id": "req_6a9a539502118ba1c33f1bfc",
  "error": {
    "type": "api_error",
    "message": "InvalidParameterValue: Please input the ImageURL that can be retrieved from the external network."
  }
}

Pricing

Billed per billable second at the price of the chosen resolution. Without a reference video the billable duration is the output duration. With a reference video the "with reference video" price applies and the billable duration is the reference video duration plus the output duration when the reference video is longer than the output, otherwise twice the output duration.

ResolutionWithout a reference video (per second)With a reference video (per second)
720P$0.157 / ¥1.0$0.0942 / ¥0.6
1080P$0.2355 / ¥1.5$0.1413 / ¥0.9
2K$0.2826 / ¥1.8$0.16956 / ¥1.08
4K$0.471 / ¥3.0$0.471 / ¥3.0

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_url is 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.
  • Reference videos are mp4 / mov, 3–30 seconds each and 30 seconds in total; reference audio is mp3.
  • reference_video_type and keep_original_sound only apply when reference_video_urls is sent.
  • 2K and 4K are upscaled output and are billed at the price of that resolution.
  • A failed task returns status: "failed" with the reason in error.message (for example InvalidParameterValue: 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 is reserved from the balance and settled to the actual usage when the task completes: resolution price × duration without a reference video, and the with-reference-video price × (output duration + 30 seconds) with one. 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 as resolution or aspect_ratio has 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 as failed, also without a charge.
  • A video takes several minutes; poll the task every 10–15 seconds, not faster.