image
from0.063 / generation
Kling Image 4.0
Generate detailed images from text with Kling Image 4.0. Create realistic scenes, product visuals and text-rich designs at 2K, 4K or native 8K.
import { config, higgsfield } from "@higgsfield/client/v2"; config({ credentials: process.env.HF_CREDENTIALS,}); const result = await higgsfield.subscribe( "kling-image/v4.0/text-to-image", { input: { "prompt": "A cinematic scene at sunset", "resolution": "2k", "aspect_ratio": "auto" }, withPolling: true, },); console.log(result);Calling the API
Use kling-image/v4.0/text-to-image 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-image/v4.0/text-to-image", { input: { "prompt": "A cinematic scene at sunset", "resolution": "2k", "aspect_ratio": "auto" }, withPolling: true, },); console.log(result);Request parameters
promptstring · required
Prompt
{
"type": "string",
"title": "Prompt",
"pattern": "\\S",
"maxLength": 50000,
"minLength": 1
}resolutionstring · optional
resolution
Options: 2k, 4k, 8k
Default: "2k"
{
"enum": [
"2k",
"4k",
"8k"
],
"type": "string",
"default": "2k"
}aspect_ratiostring · optional
aspect ratio
Options: 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, 21:9, auto
Default: "auto"
{
"enum": [
"16:9",
"9:16",
"1:1",
"4:3",
"3:4",
"3:2",
"2:3",
"21:9",
"auto"
],
"type": "string",
"default": "auto"
}Price
From $0.0630 per generation.
View all pricing