image
from0.035 / img
Recraft 4.1
Recraft V4.1 Utility generates images from text prompts with customizable resolution, aspect ratio, output format, and color options including background and palette colors. This variant focuses on utility features for precise control over image attributes.
import { config, higgsfield } from "@higgsfield/client/v2"; config({ credentials: process.env.HF_CREDENTIALS,}); const result = await higgsfield.subscribe( "recraft/v4.1/utility/text-to-image", { input: { "prompt": "A cinematic scene at sunset", "resolution": "1k", "aspect_ratio": "1:1", "output_format": "jpg" }, withPolling: true, },); console.log(result);Calling the API
Use recraft/v4.1/utility/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( "recraft/v4.1/utility/text-to-image", { input: { "prompt": "A cinematic scene at sunset", "resolution": "1k", "aspect_ratio": "1:1", "output_format": "jpg" }, withPolling: true, },); console.log(result);Request parameters
promptstring · required
Write your prompt here
{
"type": "string",
"title": "Prompt",
"maxLength": 10000,
"minLength": 1,
"description": "Write your prompt here"
}resolutionstring · optional
Resolution
Options: 1k
Default: "1k"
{
"enum": [
"1k"
],
"type": "string",
"title": "Resolution",
"default": "1k"
}aspect_ratiostring · optional
Aspect ratio
Options: 1:1, 2:1, 1:2, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 6:10, 14:10, 10:14, 16:9, 9:16
Default: "1:1"
{
"enum": [
"1:1",
"2:1",
"1:2",
"3:2",
"2:3",
"4:3",
"3:4",
"5:4",
"4:5",
"6:10",
"14:10",
"10:14",
"16:9",
"9:16"
],
"type": "string",
"title": "Aspect ratio",
"default": "1:1"
}output_formatstring · optional
Output format
Options: jpg, png, webp
Default: "jpg"
{
"enum": [
"jpg",
"png",
"webp"
],
"type": "string",
"title": "Output format",
"default": "jpg"
}colorsarray · optional
Colors
{
"type": "array",
"items": {
"type": "object",
"required": [
"rgb"
],
"properties": {
"rgb": {
"type": "array",
"items": {
"type": "integer",
"maximum": 255,
"minimum": 0
},
"maxItems": 3,
"minItems": 3
}
}
},
"title": "Colors"
}background_colorobject · optional
Background color
{
"type": "object",
"title": "Background color",
"required": [
"rgb"
],
"properties": {
"rgb": {
"type": "array",
"items": {
"type": "integer",
"maximum": 255,
"minimum": 0
},
"maxItems": 3,
"minItems": 3
}
}
}Price
From $0.0350 per image.
View all pricing