Grok Imagine Image 2.0

POST /v1/images/generationsText-to-image plus multi-reference editing with up to three source images, selectable quality tiers, and 1K or 2K output resolution.
At a glance
Pricing
Example request
Parameters
Notes
Generates images from a text prompt, or edits up to three source images from a natural-language instruction.
Modes
- Text-to-image: send a prompt with no image.
- Image editing: attach one image and describe the change you want.
- Multi-image editing: attach two or three images to combine subjects, transfer a style, or compose a scene. Refer to them in the prompt as <IMAGE_0>, <IMAGE_1>, and so on.
Example multi-image prompt
Defaults
- Medium quality at 1K resolution
- Auto aspect ratio, so the model picks the best fit for the prompt
- One output image per request
Quality and resolution
Quality selects how much work goes into the render: low returns in a few seconds, medium takes longer and resolves finer detail. Resolution selects the 1K or 2K output tier. The two combine into four price points, so a low 1K image is the cheapest option and a medium 2K image the most detailed.
Controls
Supports prompt, source images (URL or upload), quality, resolution, aspect ratio across fourteen ratios including auto, number of images, and response format.
Limits
- Up to 3 source images per edit
- Up to 10 output images per request
- Prompt up to 8,000 characters
Billing
- Charged per output image at the selected quality and resolution, plus a per-image fee for each source image you attach. Text-to-image has no source-image fee.
- A request that fails validation or is rejected before any image is produced is not billed.
- An image that is produced but then blocked by content policy is still billed. This follows xAI usage policy, which charges for the generation even when the output is blocked by the content safety check. Keep prompts and source images within the usage policy to avoid this.
Content safety
Generated images pass an automated content-safety check. An image flagged as explicit is not returned. Because the image is generated before the check runs, a flagged generation is still billed.
Machine-readable schema: GET https://api.empiriolabs.ai/v1/models/grok-imagine-image-2-0.
