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

> Grok Imagine Image Quality：图片生成模型。包含 MixRoute 调用示例与参数。

Grok Imagine Image Quality 是 xAI 推出的图片生成模型。

可使用下方端点通过 MixRoute 调用 `grok-imagine-image-quality`。

## 核心能力

* 文生图 - 根据自然语言提示词生成图片
* 输出控制 - 配置尺寸与质量
* Images API - 使用 /v1/images/generations

## 输出规格

| 属性     | 取值                       |
| ------ | ------------------------ |
| 生成端点   | `/v1/images/generations` |
| 示例尺寸   | `1024x1024`              |
| 单次生成数量 | `n`                      |

## 快速示例

<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-quality",
      "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-quality',
              'prompt': 'A minimal red circle centered on a white background',
              'size': '1024x1024',
              'n': 1},
    )

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

## 参数

| 参数        | 类型      | 必填 | 说明                                |
| --------- | ------- | -- | --------------------------------- |
| `model`   | string  | 是  | 固定为 `grok-imagine-image-quality`。 |
| `prompt`  | string  | 是  | 需要生成图片的文字描述。                      |
| `n`       | integer | 否  | 生成图片数量。                           |
| `size`    | string  | 否  | 输出图片尺寸。                           |
| `quality` | string  | 否  | 模型支持时设置输出质量。                      |
