# Grok Imagine Image

Grok Imagine Image generates images from text prompts through the Grok Imagine API, supporting styles from photorealistic to illustrative for creative workflows.

- **Model ID:** `spacexai/grok-imagine-image`
- **Type:** image
- **Providers:** xai
- **Context window:** Not applicable
- **Maximum output tokens:** 0
- **Pricing:** $0.02/image
- **Canonical page:** https://vercel.com/ai-gateway/models/grok-imagine-image

## Supported parameters

- **Parameters:** `aspectRatio`, `resolution`, `n`
- **Operations:** `text-to-image`, `image-to-image`
- **Input modalities:** `text`, `image`
- **Output modalities:** `image`
- **Aspect ratios:** `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`
- **Resolutions:** `1024x1024`, `2048x2048`
- **Durations:** Not reported
- **Frame rates:** Not reported
- **Maximum outputs per request:** 10
- **Maximum input images:** 3
- **Input image formats:** Not reported
- **Maximum input image size:** 20 MB

## Example

```ts
import { experimental_generateImage as generateImage } from 'ai';

const result = await generateImage({
  model: 'spacexai/grok-imagine-image',
  prompt: 'A red balloon on a wooden table.'
});
```

## About

Grok Imagine Image is SpaceXAI's standard image generation model, released January 28, 2026 as part of the Grok Imagine API. It generates images from text prompts, supporting a range of styles from photorealistic to illustrative. The model is designed for fast generation with a focus on instruction following and prompt adherence.

The Grok Imagine API accepts text descriptions and produces images at configurable resolutions. Grok Imagine Image handles diverse generation tasks including product mockups, marketing visuals, concept art, social media graphics, and UI design elements. It processes detailed prompts that specify composition, lighting, style, and subject matter.

For higher-fidelity output with more detail and refinement, the Grok Imagine Image Pro variant costs more per image.

## What to consider

Detailed prompts with explicit style, composition, and subject descriptions produce better results. Vague prompts may yield inconsistent output.

Evaluate whether Grok Imagine Image's output quality meets your requirements before upgrading to the Pro variant. For many use cases, standard quality is sufficient.

## When to use

### Best For

- **Rapid prototyping and concept visualization** where teams need quick visual iterations on ideas
- **Marketing and social media content** that requires custom images at scale without stock photo licensing
- **Product mockups and design exploration** for e-commerce, presentations, and pitch decks
- **Content creation pipelines** that generate illustrations, thumbnails, and visual assets programmatically
- **UI and UX design elements** including placeholder images, icons, and background patterns

### Consider Alternatives When

- **Maximum image quality and detail** where Grok Imagine Image Pro provides higher-fidelity output
- **Video generation** where Grok Imagine Video handles motion and temporal content
- **Photorealistic product photography** where specialized product-shot models may produce more consistent commercial results

## Best for

- **Rapid prototyping and concept visualization:** teams need quick visual iterations on ideas
- **Marketing and social media content** that requires custom images at scale without stock photo licensing
- **Product mockups and design exploration** for e-commerce, presentations, and pitch decks
- **Content creation pipelines** that generate illustrations, thumbnails, and visual assets programmatically
- **UI and UX design elements:** placeholder images, icons, and background patterns

## Consider alternatives

- **Maximum image quality and detail:** Grok Imagine Image Pro provides higher-fidelity output
- **Video generation:** Grok Imagine Video handles motion and temporal content
- **Photorealistic product photography:** specialized product-shot models may produce more consistent commercial results

## Frequently asked questions

### What types of images can Grok Imagine Image generate?

Grok Imagine Image generates images from text descriptions across a range of styles including photorealistic, illustrative, artistic, and graphic design. It handles diverse subjects and compositions based on prompt instructions.

### How does Grok Imagine Image differ from Grok Imagine Image Pro?

Grok Imagine Image is the standard generation model optimized for speed and versatility. The Pro variant provides higher-fidelity output with more detail and refinement at higher cost.

### Can I control the style and composition of generated images?

Yes. Include specific style, composition, lighting, and subject details in your text prompt. The model follows detailed instructions to shape the output.

### How do I call Grok Imagine Image through Vercel AI Gateway?

Use your Vercel AI Gateway API key with `spacexai/grok-imagine-image` as the model identifier. Integrate through the AI SDK's `generateImage` function or other API formats. AI Gateway handles provider routing automatically.

### Can Grok Imagine Image edit existing images?

The Grok Imagine API is primarily a text-to-image generation interface. For editing existing images, check the current API documentation for supported editing capabilities.

### What output resolutions are available?

Check the Vercel AI Gateway documentation for current supported resolutions and aspect ratios for Grok Imagine Image.

### Does Vercel AI Gateway support Zero Data Retention for Grok Imagine Image?

Yes, Zero Data Retention is available for this model. Zero Data Retention is offered on a per-provider basis. See https://vercel.com/docs/ai-gateway/capabilities/zdr for details.

## Links

- [Model page](https://vercel.com/ai-gateway/models/grok-imagine-image)
- [AI Gateway documentation](https://vercel.com/docs/ai-gateway)
- [Provider model documentation](https://docs.x.ai/developers/models/grok-imagine-image)
- [Provider pricing](https://docs.x.ai/developers/models)
