image
from0.04 / img
Grok Imagine 2.0
Generates images and makes precise edits while preserving image details and visual consistency.
import { config, higgsfield } from "@higgsfield/client/v2"; config({ credentials: process.env.HF_CREDENTIALS,}); const result = await higgsfield.subscribe( "xai/grok-imagine-image-2.0", { input: { "prompt": "A cinematic scene at sunset", "quality": "medium", "resolution": "1k", "aspect_ratio": "auto" }, withPolling: true, },); console.log(result);Calling the API
Use xai/grok-imagine-image-2.0 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( "xai/grok-imagine-image-2.0", { input: { "prompt": "A cinematic scene at sunset", "quality": "medium", "resolution": "1k", "aspect_ratio": "auto" }, withPolling: true, },); console.log(result);Request parameters
promptstring · required
Write your prompt here
{
"type": "string",
"title": "Prompt",
"description": "Write your prompt here"
}image_urlsarray · optional
Input Images
{
"type": "array",
"items": {
"type": "string",
"title": "Image",
"format": "uri"
},
"title": "Input Images",
"maxItems": 10,
"minItems": 0
}aspect_ratiostring · optional
aspect ratio
Options: auto, 1:1, 1:2, 2:1, 3:2, 2:3, 4:3, 3:4, 16:9, 9:16
Default: "auto"
{
"enum": [
"auto",
"1:1",
"1:2",
"2:1",
"3:2",
"2:3",
"4:3",
"3:4",
"16:9",
"9:16"
],
"type": "string",
"default": "auto"
}resolutionstring · optional
Resolution
Options: 1k, 2k
Default: "1k"
{
"enum": [
"1k",
"2k"
],
"type": "string",
"title": "Resolution",
"default": "1k"
}qualitystring · optional
Quality
Options: low, medium
Default: "medium"
{
"enum": [
"low",
"medium"
],
"type": "string",
"title": "Quality",
"default": "medium"
}Price
From $0.0400 per image.
View all pricing