Skip to main content
Model id grok-imagine-image-2.0 · xAI · image · 3 modes: text-to-image, image-to-image, reference-to-image.
This page reflects the current catalog. Inputs, allowed values, limits and prices can change as the model evolves; the field names and their meaning do not. For the exact schema at any time, your agent calls get_model with the mode.

Text To Image

Mode text-to-image. Text to image.

Input

Pricing

1.94–3.87 credits per image by quality and resolution (generate defaults to low, edit to medium), + 0.48 per input image. Fixed price: charged as estimated. For the exact price of a request, use estimate_generation.

Example

The arguments of generate_media:

Image To Image

Mode image-to-image. Edit one image.

Input

References: up to 1: 1 images. Assets, URLs and elements are accepted.

Pricing

1.94–3.87 credits per image by quality and resolution (generate defaults to low, edit to medium), + 0.48 per input image. Fixed price: charged as estimated. For the exact price of a request, use estimate_generation.

Example

The arguments of generate_media:

Reference To Image

Mode reference-to-image. Compose an image from 1 to 5 reference images, referred to as <IMAGE_0>, <IMAGE_1>… in the prompt.

Input

References: up to 5: 5 images. Assets, URLs and elements are accepted.

Pricing

1.94–3.87 credits per image by quality and resolution (generate defaults to low, edit to medium), + 0.48 per input image. Fixed price: charged as estimated. For the exact price of a request, use estimate_generation.

Example

The arguments of generate_media: