Skip to main content
POST
Kling O1

Headers

Authorization
string

Body

application/json
model
enum<string>
required

Model name. Must be kling-o1.

Available options:
kling-o1
prompt
string
required

Text prompt. Max 2500 characters. Use @image_1 / @element_1 / @video_1 to refer to specific materials.

Maximum string length: 2500
image_url
string<uri>

Optional. First-frame image URL.

image_end_url
string<uri>

Optional. Last-frame image URL. Requires image_url — last-frame-only is not supported. Using both frames disallows image_urls and element_ids.

ref_imgs
string<uri>[]

Optional reference images. Order is the @image_N numbering. image_urls is accepted as a compatible alias.

Maximum array length: 7
element_ids
string[]

Optional multi-image element ids created through Kling's element library. Video-character elements are not supported by O1 yet. element_id is accepted for a single value.

ref_videos
string<uri>[]

Optional reference video (.mp4 / .mov, 3–10s, 700–2160px). At most one. Named as an array to match the other reference-driven endpoints (ref_imgs / ref_videos / ref_audios), even though only one is allowed. video_url is accepted as a compatible alias, and a bare string is accepted too.

Maximum array length: 1
video_type
enum<string>
default:feature

Role of video_url. feature = imitate its motion/style (a first frame may be added, a last frame may not). base = edit that video in place (no first or last frame). Requires ref_videos.

Available options:
feature,
base
duration
integer
default:5

Video duration in seconds. ⚠️ When a first frame is given with no image_urls and no video_url, only 5 or 10 are accepted.

Required range: 3 <= x <= 10
resolution
enum<string>
default:720p

Output resolution. O1 has no 4K tier. quality is accepted as a compatible alias.

Available options:
720p,
1080p
ratio
enum<string>
default:16:9

Output aspect ratio. Only used when there is no first frame and no reference video — otherwise the material decides. aspect_ratio is accepted as a compatible alias.

Available options:
16:9,
9:16,
1:1
generate_audio
boolean
default:false

Keep the reference video's original sound. ⚠️ Requires ref_videos: O1 cannot generate an audio track, it can only retain an existing one.

custom_callback_url
string<uri>

Optional. A publicly accessible HTTPS URL. When the task status changes (processing / success / failed), GoEnhance sends a POST request to this URL. The request body is identical to the response of GET /api/v1/jobs/detail. If your server does not respond with HTTP 200, the notification is retried up to 3 times, with a 3-second timeout per attempt.

Example:

"https://your-server.com/goenhance/callback"

Response

code
integer
required
msg
string
required
data
object
required