> ## Documentation Index
> Fetch the complete documentation index at: https://docs.argil.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Grok Imagine Image 2.0

> Generate, edit or compose images (up to 5 references) with xAI Grok Imagine Image 2.0.

Model id `grok-imagine-image-2.0` · xAI · image · 3 modes: `text-to-image`, `image-to-image`, `reference-to-image`.

> [!NOTE]
>
> 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`](https://docs.argil.ai/v2/mcp/tools) with the mode.

## Text To Image

Mode `text-to-image`. Text to image.

### Input

| Field | Type | Required | Allowed | Default | Description |
| - | - | - | - | - | - |
| `prompt` | string | Yes | up to 8,000 characters | | What the image should show, or, when editing, the changes to make to the reference images. |
| `num_images` | integer | | 1 to 10 | | How many images to generate in one call. |
| `aspect_ratio` | string | | `auto`, `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `2:1`, `1:2`, `20:9`, `9:20`, `19.5:9`, `9:19.5` | | Width-to-height ratio of the generated images. |
| `resolution` | string | | `1K`, `2K` | | Output resolution. Higher resolutions cost more per image. |
| `quality` | string | | `low`, `medium` | `low` | Output quality. |

### 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`](https://docs.argil.ai/v2/mcp/tools).

### Example

The arguments of [`generate_media`](https://docs.argil.ai/v2/mcp/tools#generate_media):

```json theme={null}
{
  "model": "grok-imagine-image-2.0",
  "mode": "text-to-image",
  "input": {
    "prompt": "Studio photo of a ceramic mug with steam, soft morning light",
    "aspect_ratio": "1:1",
    "resolution": "1K"
  }
}
```

## Image To Image

Mode `image-to-image`. Edit one image.

### Input

| Field | Type | Required | Allowed | Default | Description |
| - | - | - | - | - | - |
| `prompt` | string | Yes | up to 8,000 characters | | What the image should show, or, when editing, the changes to make to the reference images. |
| `num_images` | integer | | 1 to 10 | | How many images to generate in one call. |
| `aspect_ratio` | string | | `auto`, `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `2:1`, `1:2`, `20:9`, `9:20`, `19.5:9`, `9:19.5` | | Width-to-height ratio of the generated images. |
| `resolution` | string | | `1K`, `2K` | | Output resolution. Higher resolutions cost more per image. |
| `quality` | string | | `low`, `medium` | `medium` | Output quality. |
| `references` | [File](https://docs.argil.ai/v2/mcp/how-it-works.md#your-files) list | Yes | 1 to 1 items | | References the output must follow. The kind of each one (image, video, audio) is read from the file; per-kind limits are in the mode’s `capabilities.references`. |

**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`](https://docs.argil.ai/v2/mcp/tools).

### Example

The arguments of [`generate_media`](https://docs.argil.ai/v2/mcp/tools#generate_media):

```json theme={null}
{
  "model": "grok-imagine-image-2.0",
  "mode": "image-to-image",
  "input": {
    "prompt": "Studio photo of a ceramic mug with steam, soft morning light, keeping the look of the reference",
    "aspect_ratio": "1:1",
    "resolution": "1K",
    "references": [
      "asset_91a3c7e5b2d84f6a8e0c1b9d7f3a5e24"
    ]
  }
}
```

## 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

| Field | Type | Required | Allowed | Default | Description |
| - | - | - | - | - | - |
| `prompt` | string | Yes | up to 8,000 characters | | What the image should show, or, when editing, the changes to make to the reference images. |
| `num_images` | integer | | 1 to 10 | | How many images to generate in one call. |
| `aspect_ratio` | string | | `auto`, `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `2:1`, `1:2`, `20:9`, `9:20`, `19.5:9`, `9:19.5` | | Width-to-height ratio of the generated images. |
| `resolution` | string | | `1K`, `2K` | | Output resolution. Higher resolutions cost more per image. |
| `quality` | string | | `low`, `medium` | `medium` | Output quality. |
| `references` | [File](https://docs.argil.ai/v2/mcp/how-it-works.md#your-files) list | Yes | 1 to 5 items | | References the output must follow. The kind of each one (image, video, audio) is read from the file; per-kind limits are in the mode’s `capabilities.references`. |

**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`](https://docs.argil.ai/v2/mcp/tools).

### Example

The arguments of [`generate_media`](https://docs.argil.ai/v2/mcp/tools#generate_media):

```json theme={null}
{
  "model": "grok-imagine-image-2.0",
  "mode": "reference-to-image",
  "input": {
    "prompt": "Studio photo of a ceramic mug with steam, soft morning light, keeping the look of the reference",
    "aspect_ratio": "1:1",
    "resolution": "1K",
    "references": [
      "asset_91a3c7e5b2d84f6a8e0c1b9d7f3a5e24"
    ]
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.