Skip to main content
POST
Kling 4.0 Flash

Headers

Authorization
string

Body

application/json

Kling 4.0 Flash text-to-video and image-to-video (first frame only).

Pricing — per second of generated video:

  • 720p — 5.5715 tokens ($0.11143)
model
enum<string>
required

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

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

Text prompt describing the scene, motion and camera. Required, up to 2500 characters.

Maximum string length: 2500
image_url
string<uri>

First-frame image URL. If provided, runs image-to-video (the aspect ratio follows this image); otherwise text-to-video.

Up to 10MB, width and height at least 300px, aspect ratio between 2:5 and 5:2. Smaller images are upscaled automatically.

duration
integer
default:5

Video duration in seconds, any integer from 3 to 20.

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

Output resolution. Kling 4.0 Flash only supports 720p. quality is accepted as a compatible alias.

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

Aspect ratio. Text-to-video only; ignored when image_url is provided.

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