Kling 4.0 Flash
Edit a base video with Kling 4.0 Flash using a text prompt and optional image or video references. Generate 720p output from 3 to 20 seconds. Combined input video duration must be 3 to 20 seconds.
import { config, higgsfield } from "@higgsfield/client/v2"; config({ credentials: process.env.HF_CREDENTIALS,}); const result = await higgsfield.subscribe( "kling-video/v4.0-flash/video-edit", { input: { "prompt": "A cinematic scene at sunset", "duration": 10, "video_url": "https://example.com/input.mp4", "resolution": "720p", "aspect_ratio": "16:9" }, withPolling: true, },); console.log(result);Calling the API
Use kling-video/v4.0-flash/video-edit with the Higgsfield API. Keep credentials on your server.
import { config, higgsfield } from "@higgsfield/client/v2"; config({ credentials: process.env.HF_CREDENTIALS,}); const result = await higgsfield.subscribe( "kling-video/v4.0-flash/video-edit", { input: { "prompt": "A cinematic scene at sunset", "duration": 10, "video_url": "https://example.com/input.mp4", "resolution": "720p", "aspect_ratio": "16:9" }, withPolling: true, },); console.log(result);Request parameters
promptstring · required
prompt
{
"type": "string",
"minLength": 1
}durationinteger · optional
Requested output duration in seconds, from 3 to 20.
Default: 10
{
"type": "integer",
"default": 10,
"maximum": 20,
"minimum": 3,
"description": "Requested output duration in seconds, from 3 to 20."
}image_urlstring · optional
image url
{
"type": "string",
"format": "uri",
"minLength": 1
}video_urlstring · required
video url
{
"type": "string",
"format": "uri",
"minLength": 1
}image_urlsarray · optional
image urls
{
"type": "array",
"items": {
"type": "string",
"format": "uri",
"minLength": 1
},
"maxItems": 10
}resolutionstring · optional
resolution
Options: 720p
Default: "720p"
{
"enum": [
"720p"
],
"type": "string",
"default": "720p"
}video_urlsarray · optional
video urls
{
"type": "array",
"items": {
"type": "string",
"format": "uri",
"minLength": 1
},
"maxItems": 5
}aspect_ratiostring · optional
aspect ratio
Options: 21:9, 16:9, 9:16, 1:1, adaptive
Default: "16:9"
{
"enum": [
"21:9",
"16:9",
"9:16",
"1:1",
"adaptive"
],
"type": "string",
"default": "16:9"
}Price
720p: $0.063 per billable second. Billable duration = output duration + max(total input video duration, output duration). Total input duration includes the base video and video references; explicit clips longer than 20 seconds are trimmed before measurement.
View all pricing