Skip to main content
POST
/
v1
/
videos
/
generate
curl --request POST \
  --url https://openapi.imini.ai/imini/router/v1/videos/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "kling/kling-v3-omni",
  "prompt": "A slow pan across a misty mountain valley at sunrise, cinematic",
  "resolution": "720P",
  "aspect_ratio": "16:9",
  "duration": 5
}
'
{
  "task_id": "task_2042864638838083584",
  "model": "kling/kling-v3-omni",
  "created_at": "2026-04-13T07:17:39.146Z",
  "request_id": "291a4117-9df8-4349-aee1-bdf8ffcacb9a"
}

Authorizations

Authorization
string
header
required

Pass Authorization: Bearer <YOUR_API_KEY> in the request header. Go to the API Keys management page to create and manage API Keys.

Body

application/json
model
string
required

Fixed value kling/kling-v3-omni.

prompt
string

The prompt, which may contain both positive and negative descriptions. Up to 2500 characters.

The Omni model supports referencing subjects, images, and videos in the prompt using the <<<>>> syntax, e.g. <<<element_1>>>, <<<image_1>>>, <<<video_1>>>.

Required when:

  • extra_params.multi_shot=false, or extra_params.multi_shot=true with extra_params.shot_type=intelligence.

When extra_params.multi_shot=true and extra_params.shot_type=customize, this field is ignored — per-shot prompts are provided via extra_params.multi_prompt.

Example:

"A slow pan across a misty mountain valley at sunrise, cinematic"

resolution
enum<string>
default:720P

Output resolution. Defaults to 720P.

Available options:
720P,
1080P
aspect_ratio
enum<string>
default:16:9

Output aspect ratio. Defaults to 16:9.

Available options:
16:9,
9:16,
1:1
duration
enum<integer>
default:5

Video duration in seconds. Defaults to 5. Allowed values: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15.

When using video editing (reference_videos[].refer_type=base), this parameter is ignored — the output duration matches the input video and is billed based on the input video duration, rounded to the nearest second.

Available options:
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15
generate_audio
boolean
default:false

Whether to generate audio. Defaults to false.

reference_images
object[]

Reference image list. Can provide subject / scene / style references, or serve as the first or last frame of the video.

Input modes (determined by the reference_type combination):

  • Image-to-video: 1 image with first_frame;
  • First/last-frame interpolation: 1 first_frame + 1 last_frame (last-frame-only is not supported — when last_frame is provided, first_frame must also be provided);
  • Multi-reference image-to-video: N images with asset (non-first/last-frame assets may omit reference_type, which defaults to asset).

Combining with reference_videos:

  • When reference_videos[].refer_type=base (video to be edited), first_frame / last_frame are not allowed — only asset is supported;
  • Otherwise, asset-type images can coexist with reference_videos.

Image requirements:

  • Formats: jpg / jpeg / png;
  • Size ≤ 10 MB;
  • Dimensions ≥ 300px, aspect ratio between 1:2.5 and 2.5:1.

Count limits (total of "reference images + multi-image subjects"):

  • No reference video, multi-image subjects only: ≤ 7;
  • No reference video, with a video subject: ≤ 4;
  • With a reference video, multi-image subjects only: ≤ 4.
reference_videos
object[]

Reference video list. At most 1 clip.

Two modes (distinguished by refer_type):

  • base (default) — video to be edited: the source video is repainted/edited directly. In this mode, first_frame / last_frame cannot be supplied via reference_images;
  • featurefeature reference video: only motion / style features are extracted to guide generation.

Use keep_original_sound to decide whether to preserve the original audio track — this also takes effect for feature.

When a reference video is provided, generate_audio is forced to false (no audio will be generated).

Video requirements:

  • Formats: MP4 / MOV;
  • Size ≤ 200 MB;
  • Duration ≥ 3s (upper bound depends on the model version);
  • Dimensions: 720px – 2160px inclusive;
  • Frame rate: 24 – 60 fps (output is always 24 fps);
  • Publicly accessible URL only; base64 is not supported.
Maximum array length: 1
extra_params
object

Kling's official extension parameters. All optional.

Response

Submitted successfully (asynchronous mode)

task_id
string

Unique task ID, used for subsequent polling

Example:

"task_2042864638838083584"

model
string

The model ID used for this task

Example:

"kling/kling-v3-omni"

created_at
string

Task creation time (ISO 8601)

Example:

"2026-04-13T07:17:39.146Z"

request_id
string

Unique request ID

Example:

"291a4117-9df8-4349-aee1-bdf8ffcacb9a"