video
from0.1257 / s
Kling 4.0
Create videos with Kling 4.0 from text, images, and video references. Generate up to 30-second clips in 1080p, guide keyframes, and edit existing videos.
import { config, higgsfield } from "@higgsfield/client/v2"; config({ credentials: process.env.HF_CREDENTIALS,}); const result = await higgsfield.subscribe( "kling-video/v4.0/text-to-video", { input: { "prompt": "A cinematic scene at sunset", "duration": 10, "resolution": "1080p", "aspect_ratio": "16:9" }, withPolling: true, },); console.log(result);Calling the API
Use kling-video/v4.0/text-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/text-to-video", { input: { "prompt": "A cinematic scene at sunset", "duration": 10, "resolution": "1080p", "aspect_ratio": "16:9" }, withPolling: true, },); console.log(result);Request parameters
promptstring · required
prompt
{
"type": "string",
"minLength": 1
}durationinteger · optional
duration
Default: 10
{
"type": "integer",
"default": 10,
"maximum": 30,
"minimum": 3
}resolutionstring · optional
resolution
Options: 720p, 1080p
Default: "1080p"
{
"enum": [
"720p",
"1080p"
],
"type": "string",
"default": "1080p"
}aspect_ratiostring · optional
aspect ratio
Options: 21:9, 16:9, 9:16, 1:1
Default: "16:9"
{
"enum": [
"21:9",
"16:9",
"9:16",
"1:1"
],
"type": "string",
"default": "16:9"
}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