Skip to Content
Video ModelsKling O1

Kling O1

Overview

Kling O1 is Kuaishou’s premium reasoning-based video generation model. It excels at understanding complex prompts and generating videos with superior motion consistency, realistic physics, and cinematic quality. The model supports both Text-to-Video and Image-to-Video modes.

Test API KEY: key_00000000000000000000000000000000

Endpoints

1. Create Task

Request

POST https://api.pixwith.ai/api/task/create

Headers

HeaderValueRequired
Content-Typeapplication/jsonYes
Api-Key{API_KEY}Yes

Request Parameters

ParameterTypeRequiredDescription
promptstringYesThe input prompt (e.g., “A spacecraft landing on Mars surface”)
image_urlsarrayConditional[“https://cdn.pixwith.ai/xxx.jpg ”]. Provide 1-2 images for Image-to-Video mode (first image as start frame, optional second image as end frame).
model_idstringYes2-35
optionsobjectYesConfiguration options for the task
options.prompt_optimizationbooleanYesIf true, all prompt words will be automatically translated into English.
options.num_outputsintNoNumber of videos to generate. Valid values: 1 to 4. Default: 1.
options.aspect_ratiostringYesAspect ratio of the output. Valid values: '1:1' (Default), '16:9', '9:16'.
options.durationintYesDuration of the video in seconds. Valid values: 5 or 10. Default: 5.

Example Request - Text-to-Video

{ "prompt": "A spacecraft landing on Mars surface, dust clouds rising, cinematic view", "model_id": "2-35", "options": { "prompt_optimization": true, "num_outputs": 1, "aspect_ratio": "16:9", "duration": 5 } }

Example Request - Image-to-Video

{ "prompt": "The astronaut walks towards the camera", "image_urls": ["https://cdn.pixwith.ai/start-frame.jpg"], "model_id": "2-35", "options": { "prompt_optimization": true, "num_outputs": 1, "aspect_ratio": "16:9", "duration": 10 } }

Example Request - Image-to-Video with End Frame

{ "prompt": "Smooth transition between scenes", "image_urls": [ "https://cdn.pixwith.ai/start-frame.jpg", "https://cdn.pixwith.ai/end-frame.jpg" ], "model_id": "2-35", "options": { "prompt_optimization": true, "num_outputs": 1, "aspect_ratio": "16:9", "duration": 5 } }

Response Parameters

ParameterTypeDescription
codeint1=success, 0=error
messagestringSuccess and failure messages
dataobject
data.task_idstring
data.estimated_timeintEstimated time in seconds

Response

{ "code": 1, "message": "success", "data": { "task_id": "d425ab4dc256f0ebaa84862b9cea8a3d", "estimated_time": 150 } }

Credits

DurationCredits per Video
5 seconds90
10 seconds180
Last updated on