xAI Grok Imagine Image 2.0

1K low, from 15.6 credits per image
ae_grok_imagine_image_2_0

Generate images from text or edit images using one to three reference image URLs with Grok Imagine Image 2.0. Omit `reference_image_urls` to generate from the prompt alone. To edit, supply one to three publicly accessible HTTPS image URLs. In the prompt, use `<IMAGE_0>`, `<IMAGE_1>`, and `<IMAGE_2>` to refer to the supplied images in order. The tool returns links to the resulting images.

Image
1K low, from 15.6 credits per image

Pricing

SpecificationPrice
1K low15.6 credits/image
1.5K low19.5 credits/image
2K low23.4 credits/image
1K medium23.4 credits/image
1.5K medium27.3 credits/image
2K medium31.2 credits/image
Edit reference image4.2 credits per reference image

Output is billed by resolution, quality, and requested image count. Edits add one charge per reference image per request. One 1K low output with one reference image has a total of 19.8 credits.

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
request_bodyobjectYes填写提示词、输出规格和可选参考图。传参考图时编辑图片,省略时文生图。—
request_body.nintegerNo希望输出的图片张数,1–4 张,默认 1 张。1
request_body.promptstringYes描述要生成的画面,或说明希望怎么修改参考图。—
request_body.qualityenum (low | medium)No可选低画质(low)或中画质(medium),默认低画质。low
request_body.resolutionenum (1k | 1.5k | 2k)No图片分辨率档位,可选 1K、1.5K 或 2K,默认 1K。1k
request_body.aspect_ratiostringNo填写期望的画面宽高比,例如 1:1 或 16:9。—
request_body.reference_image_urlsarrayNo传入 1–3 张公开可访问的原图链接即可进入图片编辑。省略时根据提示词生成新图。—

Invocation example

Parameter template

Generated from the parameter configuration. Replace the sample values before use.

POST/agent-api/v1/tool/executeX-Api-Key
Request coderequest.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_grok_imagine_image_2_0' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "request_body": {
      "prompt": "xxx"
    }
  }
}'

No response example available yet.