AGTCloud API Docs
GuidesAPI ReferenceIntegrations and resourcesUpdate and help
Image generationGrok Image

Grok Imagine Image parameter and API differences

Learn about generation parameters, reference image formats, and editing limits for Grok image models.

For the full request structure, see Create an image and Edit an image.

Applicable models

ModelSupported APIs
grok-imagine-image-2.0
grok-imagine-image
Create an image, Edit an image

Model-specific parameters

The 2.0 parameters come from the xAI documentation. The current test channel has no 2.0 model, so platform compatibility remains unverified.

FieldDetails
quality2.0 supports low, medium, and auto. The default, auto, uses low for generation and medium for editing. Omit this field for grok-imagine-image.
aspect_ratio2.0 supports 21:9 and 5:2 for generation and editing. When omitted in a 2.0 multi-image edit, the output follows the first reference image’s aspect ratio.
imagesMulti-image editing with two references was verified for grok-imagine-image. Pass an array of URL strings or an array of objects with type: "image_url" and url. xAI documents a limit of 5 references for 2.0.

Single-image editing

For single-image edits with grok-imagine-image, provide a publicly accessible HTTPS image URL. You can write image in either of these forms.

FormatRequest field
Recommendedimage: {"url":"https://example.com/input.png"}
Compatibleimage: "https://example.com/input.png"

To get the image data directly, set response_format: "b64_json" and read data[].b64_json.

Official references

On this page