# xai/grok-imagine-image

![xai](<https://img.modellix.ai/modelix-models-image/20260623/xai.png?v=1&w=640&h=640>)[文档](<https://docs.modellix.ai/xai/grok-imagine-image>)

[Schema](<https://www.modellix.ai/models/xai/grok-imagine-image/api_schema>)

### xAI's text-to-image model for high-volume prototypes, creative variants, and everyday visuals. It generates images at 1K or 2K across square, portrait, landscape, and ultrawide frames.

~~官方价格: $0.0200/img~~$0.0240/img

text-to-image

## README

## What Grok Imagine Image Does

Grok Imagine Image is xAI’s standard text-to-image generation model. It generates images from text prompts through an asynchronous task interface, balancing speed and quality for everyday, general-purpose image creation.

## Key Features

- **General-Purpose Generation:** Produces solid images from text for a wide range of everyday creative needs.
- **Batch Output:** Generate multiple images per request via the `n` parameter.
- **Wide Aspect-Ratio Support:** Offers many ratios — 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 2:1, 1:2, and ultrawide options like 19.5:9 and 20:9, plus `auto`.
- **Selectable Resolution:** Choose 1K or 2K output.
- **Flexible Response Format:** Return results as a `url` or base64 `b64_json`.
- **Asynchronous Architecture:** Uses a “Create Task → Poll Result” API workflow for reliable integration.

## How to Use Grok Imagine Image

1. Write a text prompt describing the image you want.
2. Submit a `POST` request to the `/api/v1/xai/grok-imagine-image` endpoint with your `prompt` and optional `n`, `aspect_ratio`, `resolution`, and `response_format`.
3. Receive a `task_id` and polling URL in the response.
4. Poll the returned URL with a `GET` request to monitor the task.
5. Once complete, retrieve the image as a URL or base64 string.

## Best Use Cases

- **Rapid Prototyping:** Quickly test visual ideas and concepts.
- **Social Media Content:** Generate on-trend graphics across many aspect ratios.
- **General-Purpose Imagery:** Cover everyday image needs where balanced speed and quality matter.
- **Batch Asset Creation:** Produce multiple variations in a single request.

## Tips for Better Results

- **Use the Quality Variant for Max Fidelity:** When maximum detail is required, switch to Grok Imagine Image Quality — the standard model trades some fidelity for speed.
- **Set the Right Aspect Ratio:** Pick a ratio that matches the final placement (e.g., 9:16 for stories, 16:9 for banners) instead of leaving it on `auto`.
- **Generate in Batches:** Increase `n` to compare several options from one prompt.
- **Choose 2K for Detail:** Use 2K resolution when you need sharper output.
- **Be Specific:** Describe subject, style, lighting, and mood clearly for the cleanest results.

## 属性

- 提供商: [xai](<https://www.modellix.ai/zh_CN/providers/xai.md>)
- 类别: [文生图](<https://www.modellix.ai/zh_CN/category/text-to-image.md>)

### 系列

- [Grok Imagine](<https://www.modellix.ai/zh_CN/series/grok-imagine.md>)

## 参数

| 参数名 | 描述 | 类型 | 必填 | 枚举值 |
| --- | --- | --- | --- | --- |
| prompt | Text description of the image to generate | string | 是 | \- |
| aspect\_ratio | Aspect ratio of the generated image | string | 否 | `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `2:1`, `1:2`, `19.5:9`, `9:19.5`, `20:9`, `9:20`, `auto` |
| n | Number of images to generate (official examples use 4; no fixed upper limit) | integer | 否 | \- |
| resolution | Output resolution tier | string | 否 | `1k`, `2k` |
| response\_format | Format of the returned image data | string | 否 | `url`, `b64_json` |

## 价格

| 价格（$/img） |
| --- |
| 0.0240 |

## 相关模型

- [xai/grok-imagine-video-1.5-lite-i2v](<https://www.modellix.ai/zh_CN/models/xai/grok-imagine-video-1.5-lite-i2v.md>): xAI’s lower-cost image-to-video model for animating one still into a short clip with native audio and lip-synced speech. The image is the first frame, and the clip follows its shape, at 480p, 720p, or 1080p upscaled from 720p, for 1 to 15 seconds.
- [xai/grok-imagine-video-1.5-lite](<https://www.modellix.ai/zh_CN/models/xai/grok-imagine-video-1.5-lite.md>): xAI’s lower-cost text-to-video model for simple social clips and prompt drafts, with native audio and lip-synced speech. It makes 1 to 15 second clips at 480p, 720p, or 1080p upscaled from 720p, including wide 21:9 and 5:2 frames.
- [xai/grok-imagine-image-2.0-edit](<https://www.modellix.ai/zh_CN/models/xai/grok-imagine-image-2.0-edit.md>): xAI’s image editor for restyles, combined references, and iterative changes that follow the prompt while keeping the source recognizable. It edits one to three source images at 1K or 2K, with a low or medium quality setting.
- [xai/grok-imagine-image-2.0](<https://www.modellix.ai/zh_CN/models/xai/grok-imagine-image-2.0.md>): xAI’s precise text-to-image model for design, photography, and illustration that need close prompt following, planned typography, and sharp small text. It generates up to 10 images at 1K or 2K, including wide 21:9 and 5:2 frames, with a low or medium quality setting.
- [xai/grok-imagine-video-extend](<https://www.modellix.ai/zh_CN/models/xai/grok-imagine-video-extend.md>): xAI’s video extension model for continuing a clip from its last frame with new prompt-guided action. It appends 2 to 10 seconds and keeps the source shape, up to 720p.
- [xai/grok-imagine-video-edit](<https://www.modellix.ai/zh_CN/models/xai/grok-imagine-video-edit.md>): xAI’s video editor for prompt-guided changes such as restyles, wardrobe, and props, while keeping the rest of the clip close to the source. The result keeps the source duration and shape, up to 720p.
- [xai/grok-imagine-video-1.5-i2v](<https://www.modellix.ai/zh_CN/models/xai/grok-imagine-video-1.5-i2v.md>): xAI’s image-to-video model for animating one still with clearer motion, physics, and native audio, including lip-synced speech. It makes 1 to 15 second clips at native 1080p, 720p, or 480p.
- [xai/grok-imagine-video-r2v](<https://www.modellix.ai/zh_CN/models/xai/grok-imagine-video-r2v.md>): xAI’s reference-to-video model for placing specific characters or products into a new scene while keeping them recognizable, with generated audio. It uses up to seven reference images in clips up to 10 seconds at 480p or 720p.
- [xai/grok-imagine-video-i2v](<https://www.modellix.ai/zh_CN/models/xai/grok-imagine-video-i2v.md>): xAI’s image-to-video model for turning one still into a short clip with generated audio. The starting image leads the motion, in 1 to 15 second clips at 480p or 720p.
- [xai/grok-imagine-video](<https://www.modellix.ai/zh_CN/models/xai/grok-imagine-video.md>): xAI’s text-to-video model for short social clips and animated scenes described in a prompt, with generated audio. It makes 1 to 15 second clips at 480p or 720p.
- [xai/grok-imagine-image-edit](<https://www.modellix.ai/zh_CN/models/xai/grok-imagine-image-edit.md>): xAI’s image editor for fast restyles, quick variations, and lightweight prompt-guided changes. It edits one to three source images at 1K or 2K.
- [xai/grok-imagine-image-quality-edit](<https://www.modellix.ai/zh_CN/models/xai/grok-imagine-image-quality-edit.md>): xAI’s higher-fidelity image editor for detailed restyles and prompt-guided changes that keep fine texture. It edits one to three source images at 1K or 2K.
- [xai/grok-imagine-image-quality](<https://www.modellix.ai/zh_CN/models/xai/grok-imagine-image-quality.md>): xAI’s higher-fidelity text-to-image model for detailed concept art, marketing visuals, and scenes that need realistic texture, stronger rendered text, and tighter prompt following. It generates images at 1K or 2K across a wide set of aspect ratios.

## 相关资源

[**Grok Imagine**](<https://www.modellix.ai/zh_CN/series/grok-imagine.md>)

Series

[**xai/grok-imagine-video-1.5-lite-i2v**](<https://www.modellix.ai/zh_CN/models/xai/grok-imagine-video-1.5-lite-i2v.md>)

image-to-video

[**xai/grok-imagine-video-1.5-lite**](<https://www.modellix.ai/zh_CN/models/xai/grok-imagine-video-1.5-lite.md>)

text-to-video

[**xai/grok-imagine-image-2.0-edit**](<https://www.modellix.ai/zh_CN/models/xai/grok-imagine-image-2.0-edit.md>)

image-to-image

[**xai/grok-imagine-image-2.0**](<https://www.modellix.ai/zh_CN/models/xai/grok-imagine-image-2.0.md>)

text-to-image

[**xai/grok-imagine-video-extend**](<https://www.modellix.ai/zh_CN/models/xai/grok-imagine-video-extend.md>)

video-to-video

[**xai/grok-imagine-video-edit**](<https://www.modellix.ai/zh_CN/models/xai/grok-imagine-video-edit.md>)

video-to-video

[**xai/grok-imagine-video-1.5-i2v**](<https://www.modellix.ai/zh_CN/models/xai/grok-imagine-video-1.5-i2v.md>)

image-to-video
