video
from0.1257 / s
Kling 4.0
Animate images with Kling 4.0. Guide the video with a starting image, reference images, or an ending frame, and generate clips up to 30 seconds long in 720p or 1080p.
import { config, higgsfield } from "@higgsfield/client/v2"; config({ credentials: process.env.HF_CREDENTIALS,}); const result = await higgsfield.subscribe( "kling-video/v4.0/image-to-video", { input: { "duration": 10, "image_url": "https://example.com/input.jpg", "resolution": "1080p" }, withPolling: true, },); console.log(result);Calling the API
Use kling-video/v4.0/image-to-video 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/image-to-video", { input: { "duration": 10, "image_url": "https://example.com/input.jpg", "resolution": "1080p" }, withPolling: true, },); console.log(result);Request parameters
promptstring · optional
prompt
{
"type": "string"
}durationinteger · optional
duration
Default: 10
{
"type": "integer",
"default": 10,
"maximum": 30,
"minimum": 3
}image_urlstring · required
image url
{
"type": "string",
"format": "uri",
"minLength": 1
}image_urlsarray · optional
Intermediate frames between the first and end frames. Up to 8 images.
{
"type": "array",
"items": {
"type": "string",
"format": "uri",
"minLength": 1
},
"title": "Middle frames",
"maxItems": 8,
"description": "Intermediate frames between the first and end frames. Up to 8 images."
}resolutionstring · optional
resolution
Options: 720p, 1080p
Default: "1080p"
{
"enum": [
"720p",
"1080p"
],
"type": "string",
"default": "1080p"
}end_image_urlstring · optional
end image url
{
"type": "string",
"format": "uri",
"minLength": 1
}Price
Standard self-serve rates in USD per video second: 720p: $0.1257; 1080p: $0.1879. Total price = selected rate × output duration in seconds.
View all pricing