POST
https://api.unifically.com
/
kling-o1
/
generate
Generate Video
curl --request POST \
  --url https://api.unifically.com/kling-o1/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>",
  "aspect_ratio": "<string>",
  "duration": 123,
  "image_urls": [
    {}
  ],
  "start_image_url": "<string>",
  "end_image_url": "<string>",
  "resolution": "<string>",
  "callback_url": "<string>"
}
'
{
  "code": 200,
  "data": {
    "status": "processing",
    "task_id": "dd55ae25-adff-47a0-9194-6a37845b58e4"
  }
}
Generate high-quality AI videos using the Kling O1 (Omni) model. Supports two generation modes: Reference Images mode and Start/End Image mode.

Pricing

DurationPrice
3s$0.144
4s$0.192
5s$0.24
6s$0.288
7s$0.336
8s$0.384
9s$0.432
10s$0.48

Mode 1: Reference Images

Use 1-7 reference images to guide video generation. At least one image is required.
curl -X POST "https://api.unifically.com/kling-o1/generate" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "image_urls": ["url1.jpg", "url2.jpg", "url3.jpg"],
    "prompt": "prompt",
    "aspect_ratio": "9:16",
    "duration": 10,
    "resolution": "1080p"
  }'
Duration: 3-10 seconds

Mode 2: Start/End Frame

Use a start image (required) and optionally an end image for smooth transitions.
curl -X POST "https://api.unifically.com/kling-o1/generate" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "start_image_url": "https://example.com/start.jpg",
    "end_image_url": "https://example.com/end.jpg",
    "prompt": "smooth transition",
    "aspect_ratio": "16:9",
    "duration": 10,
    "resolution": "1080p"
  }'
Duration: 5 or 10 seconds only

Parameters

Required Parameters

prompt
string
required
Text description of the video to generate.
aspect_ratio
string
required
Aspect ratio of the generated videoOptions: "1:1", "9:16", "16:9"
duration
integer
required
Video duration in secondsMode 1: 3, 4, 5, 6, 7, 8, 9, 10Mode 2: 5, 10 only

Mode 1 Parameters

image_urls
array
required
Array of reference image URLs (Mode 1: Reference Images)Required: At least 1 imageMaximum: 7 images

Mode 2 Parameters

start_image_url
string
required
URL of the starting frame image (Mode 2: Start/End Frame)
end_image_url
string
URL of the ending frame image (Mode 2: Start/End Frame)Optional

Optional Parameters

resolution
string
Video resolutionOptions: "720p", "1080p"Default: "1080p"
callback_url
string
URL to receive webhook notification on completion

Validation Rules

  • Mode 1 (Reference Images): Provide image_urls array with 1-7 images (at least 1 required), duration 3-10 seconds
  • Mode 2 (Start/End Frame): Provide start_image_url (required), end_image_url (optional), duration 5 or 10 seconds only
  • Aspect Ratio: Must be one of 1:1, 9:16, or 16:9
  • Resolution: 720p or 1080p

Response

{
  "code": 200,
  "data": {
    "status": "processing",
    "task_id": "dd55ae25-adff-47a0-9194-6a37845b58e4"
  }
}

Response Fields

code
integer
default:"200"
HTTP status code (200 for success)
data
object
Response data
task_id
string
Unique identifier for this generation task
status
string
Task status (e.g., “processing”)

Error Response

{
  "code": 400,
  "data": {
    "message": "Error description",
    "code": "ERROR_CODE"
  }
}