Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.unifically.com/llms.txt

Use this file to discover all available pages before exploring further.

Generate high-quality AI videos using Kling O1. Supports text-to-video, raw reference images, persistent subject/object elements (image only), start/end frames, video transform, and video reference. Same shape as Omni 3.0 but does not support multi_shots, native_audio, or video-type elements. Max duration 10s.

Model

kuaishou/kling-o1-video

Parameters

ParameterTypeRequiredDefaultDescription
video_modestringNo-Input mode. Allowed: "elements", "start_end_frame", "transform", "video_reference". Omit for text-to-video
promptstringYes-Text prompt
modestringNo"pro""std" (720p) or "pro" (1080p)
durationintegerNo5Video length in seconds (3–10)
aspect_ratiostringNo-"1:1", "9:16", "16:9", or "auto". Must be "auto" when video_url is set; rejected otherwise. Omit to let the server choose ("auto" if video_url, else "16:9")
image_urlsstring[]No-Raw reference image URLs uploaded per request (max 7). No description, no reuse. Use @Image1, @Image2 in prompt
start_image_indexintegerNo-1-based index into image_urls marking which reference image anchors the first frame. No end-frame equivalent
elementsElementInput30[]No-Persistent subject/object assets (image only on O1). Auto-created on Kling and auto-deleted if submit fails. Use @Element1, @Element2 in prompt. Coexists with image_urls
start_frame_urlstringNo-First frame image URL (start_end_frame mode)
end_frame_urlstringNo-Last frame image URL (start_end_frame mode)
video_urlstringNo-Source video URL (transform / video_reference modes)

Modes

ModeRequired inputsOptional inputsNotes
omitted (text-to-video)promptRejects every input field including elements, image_urls, start_frame_url, video_url
elementsAt least one of image_urls, elementsCombined image_urls + elements cap of 7. video_url rejected
start_end_framestart_frame_urlend_frame_url, elements
transformvideo_urlimage_urls, elementsCombined image_urls + elements cap of 4. aspect_ratio must be "auto"
video_referencevideo_urlimage_urls, elementsCombined image_urls + elements cap of 4. aspect_ratio must be "auto"
Text-to-video with elements — set video_mode: "elements" and pass only the elements array (no image_urls required). The omit-video_mode path is strictly for pure text-to-video with zero inputs; any reference (image or element) requires elements mode.

Reference images vs elements

  • image_urls — raw images uploaded per request. Single-use, no description, no reuse across tasks. Cap 7. Reference in prompt as @Image1, @Image2, …
  • elements — persistent subject/object assets stored on the Kling account. Auto-created from your input on submit and auto-deleted if the submit fails. Reference in prompt as @Element1, @Element2, …
Both can be used together; they share the per-mode combined cap.

Elements

O1 supports IMAGE elements only — passing an element with type: "video" returns 400.
"elements": [
  {"description": "Woman in red jacket", "type": "image", "image_urls": ["front.jpg", "side.jpg"]}
]
Each element accepts:
ParameterTypeDefaultDescription
descriptionstring""Short description of the element (max 100 chars)
typestring"image"Must be "image" on O1
image_urlsstring[]-Source image URLs for the element (max 4)

Example - Text-to-Video

curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "kuaishou/kling-o1-video",
    "input": {
      "prompt": "A cinematic drone shot over a misty forest at dawn",
      "duration": 10,
      "mode": "pro"
    }
  }'

Example - Reference Images

curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "kuaishou/kling-o1-video",
    "input": {
      "video_mode": "elements",
      "prompt": "Create a video featuring @Image1 and @Image2",
      "image_urls": ["https://example.com/ref1.jpg", "https://example.com/ref2.jpg"],
      "duration": 10,
      "mode": "pro"
    }
  }'

Example - With Elements

curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "kuaishou/kling-o1-video",
    "input": {
      "video_mode": "elements",
      "prompt": "@Element1 walks through a park at sunset",
      "elements": [
        {"description": "Woman in red jacket", "type": "image", "image_urls": ["https://example.com/front.jpg"]}
      ],
      "duration": 10,
      "mode": "pro"
    }
  }'

Example - Start/End Frame

curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "kuaishou/kling-o1-video",
    "input": {
      "prompt": "Smooth transition between scenes",
      "video_mode": "start_end_frame",
      "start_frame_url": "https://example.com/start.jpg",
      "end_frame_url": "https://example.com/end.jpg",
      "duration": 10,
      "mode": "pro"
    }
  }'

Response

{
  "code": 200,
  "success": true,
  "data": {
    "task_id": "abc123def456",
    "status": "pending"
  }
}