image
from0.21 / img
Recraft 4.1
Recraft V4.1 Utility Pro generates images from text prompts with customizable resolution, aspect ratio, output format, and color options. Users can specify background colors and a palette of colors to influence the image creation process.
import { config, higgsfield } from "@higgsfield/client/v2"; config({ credentials: process.env.HF_CREDENTIALS,}); const result = await higgsfield.subscribe( "recraft/v4.1/utility/pro/text-to-image", { input: { "prompt": "A cinematic scene at sunset", "resolution": "2k", "aspect_ratio": "1:1", "output_format": "jpg" }, withPolling: true, },); console.log(result);Calling the API
Use recraft/v4.1/utility/pro/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/pro/text-to-image", { input: { "prompt": "A cinematic scene at sunset", "resolution": "2k", "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: 2k
Default: "2k"
{
"enum": [
"2k"
],
"type": "string",
"title": "Resolution",
"default": "2k"
}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.2100 per image.
View all pricing