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

# Grok Imagine Image

> Grok Imagine Image: image generation model. Request examples and parameters for MixRoute.

Grok Imagine Image is an image generation model from xAI.

Call `grok-imagine-image` through MixRoute using the endpoint shown below.

## Key capabilities

* Text-to-image - Generate images from natural-language prompts
* Output controls - Configure size and quality
* Images API - Uses /v1/images/generations

## Output specifications

| Property           | Value                    |
| ------------------ | ------------------------ |
| Generate endpoint  | `/v1/images/generations` |
| Example size       | `1024x1024`              |
| Images per request | `n`                      |

## Quick example

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.mixroute.ai/v1/images/generations" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "model": "grok-imagine-image",
      "prompt": "A minimal red circle centered on a white background",
      "size": "1024x1024",
      "n": 1
    }'
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import requests

    response = requests.post(
        "https://api.mixroute.ai/v1/images/generations",
        headers={"Authorization": "Bearer YOUR_API_KEY"},
        json={'model': 'grok-imagine-image',
              'prompt': 'A minimal red circle centered on a white background',
              'size': '1024x1024',
              'n': 1},
    )

    print(response.json())
    ```
  </Tab>
</Tabs>

## Parameters

| Parameter | Type    | Required | Description                           |
| --------- | ------- | -------- | ------------------------------------- |
| `model`   | string  | Yes      | Must be `grok-imagine-image`.         |
| `prompt`  | string  | Yes      | Description of the image to generate. |
| `n`       | integer | No       | Number of images to generate.         |
| `size`    | string  | No       | Output image dimensions.              |
| `quality` | string  | No       | Output quality when supported.        |
