Skip to main content
Generate and edit images using the speed-focused Grok Imagine image model. The API produces exactly one output image per task.
The enable_pro parameter has been removed. Speed and quality are now separate models: use xai/grok-imagine-image for speed or xai/grok-imagine-2.0-image for Grok Imagine 2.0 quality.

Model

Parameters

Text-to-image and image-edit requests each generate exactly one image. The generation count is fixed internally and cannot be changed by callers.Providing image_urls changes the operation to image editing but does not switch models. This endpoint remains on xai/grok-imagine-image.

Example requests

Text to image

Image editing

Response

Image-edit failure diagnostics

Before uploading edit references, the API checks Grok’s reported imageEdit quota. If the selected account explicitly has no edit quota, the request is retried with another available account. A quota response that does not expose an image-edit allowance is recorded as unknown rather than treated as exhausted. When an edit task fails, its debug_response includes diagnostics from every upstream attempt. These may include: Common diagnosed_reason values:
The API retains the complete upstream stream to make provider-side failures diagnosable. Avoid exposing debug_response publicly if prompts or upstream metadata may be sensitive.
Volume discounts are available for almost all models. Reach out at contact@unifically.com to discuss custom pricing.