You're looking at a specific version of this model. Jump to the model overview.

xai /grok-imagine-image-2:1ef875bf

Input schema

The fields you can use to run this model with an API. If you don’t give a value for a field its default value will be used.

Field Type Default value Description
prompt
string
Text prompt for image generation or editing
image
string
Input image for editing. When provided, the model edits this image based on the prompt. Supports jpg, jpeg, png, webp.
aspect_ratio
None
1:1
Aspect ratio of the generated image. Ignored when editing an image.
resolution
None
2k
Resolution of the generated image.
quality
None
medium
Generation quality. 'medium' produces the best results, 'low' is faster and cheaper.

Output schema

The shape of the response you’ll get when you run this model with an API.

Schema
{'format': 'uri', 'title': 'Output', 'type': 'string'}