Skip to main content
POST
Kling 4.0 Reference to Video

Headers

Authorization
string

Body

application/json

Kling 4.0 reference-to-video (reference images and / or reference videos).

Pricing — per billed second:

  • 720p, images only — 10.205 tokens ($0.2041)
  • 1080p, images only — 15.275 tokens ($0.3055)
  • 720p, with reference videos — 6.11 tokens ($0.1222)
  • 1080p, with reference videos — 9.165 tokens ($0.1833)
model
enum<string>
required

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

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

Text prompt. Required, up to 2500 characters. Refer to assets as <<<image_1>>> / <<<video_1>>> (numbered from 1 by array order); a number with no matching asset is rejected.

Maximum string length: 2500
image_urls
string<uri>[]

Reference image URLs (up to 10), used as style, scene or subject references. <<<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
video_urls
string<uri>[]

Reference video URLs (up to 5). <<<video_1>>> is the first item. Each video must be at least 3 seconds, and all videos together at most 30 seconds. MP4 or MOV, up to 200MB, width and height each 720-2160px, 24-60fps.

Adding reference videos switches billing to output + max(reference videos, output) seconds at the reference-video rate (see Pricing).

Maximum array length: 5
duration
integer
default:5

Output duration in seconds, any integer from 3 to 30.

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

Output resolution. quality is accepted as a compatible alias.

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

Aspect ratio of the output.

Available options:
16:9,
9:16,
1:1,
21:9
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