Skip to main content
POST
Kling 4.0 Video Edit

Headers

Authorization
string

Body

application/json

Kling 4.0 video edit (one source video, optional style reference images).

Pricing — per billed second (output + max(source, output)):

  • 720p — 6.11 tokens ($0.1222)
  • 1080p — 9.165 tokens ($0.1833)
model
enum<string>
required

Model name. Must be kling-4-0-edit on this page.

Available options:
kling-4-0-edit
prompt
string
required

Editing instructions. Required, up to 2500 characters. Refer to the source video as <<<video_1>>> and to reference images as <<<image_1>>> …; a number with no matching asset is rejected.

Maximum string length: 2500
video_urls
string<uri>[]
required

The video to edit — exactly one URL. 3 to 30 seconds. MP4 or MOV, up to 200MB, width and height each 720-2160px, 24-60fps.

Required array length: 1 element
image_urls
string<uri>[]

Optional style reference image URLs (up to 10). <<<image_1>>> is the first item.

Up to 10MB each, width and height at least 300px. Smaller images are upscaled automatically.

Maximum array length: 10
duration
default:auto

Output duration: "auto" (default) matches the source video, or any integer from 3 to 30 seconds. Billing uses output + max(source, output) seconds.

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

Output resolution. quality is accepted as a compatible alias.

Available options:
720p,
1080p
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