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

xai /grok-imagine-image:a41e0f0c

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.
n
integer
1

Min: 1

Max: 10

Number of images to generate (1-10). Ignored when editing an image.
aspect_ratio
None
1:1
Aspect ratio of the generated image. Ignored when editing an image.

Output schema

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

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