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,
  "video_url": "<string>",
  "image_urls": [
    {}
  ],
  "callback_url": "<string>"
}
'
{
  "code": 200,
  "data": {
    "status": "processing",
    "task_id": "dd55ae25-adff-47a0-9194-6a37845b58e4"
  }
}
Generate high-quality AI videos using the Kling O1 model with support for video and optional image inputs.

Pricing

For current pricing, see the Pricing page.

Request

curl --location 'https://api.unifically.com/kling-o1/generate' \
--header 'Content-Type: application/json' \
--header 'Authorization: YOUR_API_KEY' \
--data '{
  "prompt": "Replace humans with dogs on image",
  "aspect_ratio": "1:1",
  "duration": 10,
  "image_urls": [
    "https://iili.io/fxeHKVR.md.png"
  ],
  "video_url": "https://files.storagecdn.online/video/example.mp4"
}'

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 secondsOptions: 3, 4, 5, 6, 7, 8, 9, 10
video_url
string
required
URL of the input video for video generation

Optional Parameters

image_urls
array
Array of image URLs to use as input (optional)Maximum: 4 imagesDefault: []
callback_url
string
URL to receive webhook notification on completion

Validation Rules

  • Aspect Ratio: Must be one of 1:1, 9:16, or 16:9
  • Duration: Must be between 3 and 10 seconds (inclusive)
  • Image URLs: Maximum of 4 images allowed
  • Video URL: Required and must be a valid URL

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"
  }
}