# Grok Imagine Image 2.0 API (xAI)

> Grok Imagine Image 2.0 from xAI generates and edits striking photoreal and stylized images at 1K or 2K, with up to 3 input images for editing.

Page: https://cheapergen.com/models/xai/grok-imagine-image · API reference: https://cheapergen.com/models/xai/grok-imagine-image/api

## Pricing
Official list price source: xAI API list price for grok-imagine-image-2.0 (1K $0.04 low / $0.06 medium, 2K $0.06 / $0.08; $0.01 per input image). Prices verified 2026-10-16.

| Tier | Official | Cheaper Gen. | Save |
|---|---|---|---|
| 1K · low | $0.0400/image | $0.0220/image | 45% |
| 1K · medium | $0.0600/image | $0.0220/image | 63% |
| 2K · low | $0.0600/image | $0.0528/image | 12% |
| 2K · medium | $0.0800/image | $0.0704/image | 12% |

## Specs
- Resolutions: 1K · 2K
- Quality: low · medium
- Aspect ratios: 1:1 · 3:4 · 4:3 · 9:16 · 16:9 · 2:3 · 3:2 · 1:2 · 2:1 · 9:19.5 · 19.5:9 · 9:20 · 20:9
- Edit inputs: Up to 3 images

## Endpoints

### Text to Image — `POST https://cheapergen.com/api/v1/run/xai/grok-imagine-image/text-to-image`

| Param | Type | Required | Description |
|---|---|---|---|
| prompt | string | yes | Describe the shot: subject, action, camera movement, lighting and style. |
| aspect_ratio | string (enum) (1:1, 3:4, 4:3, 9:16, 16:9, 2:3, 3:2, 1:2, 2:1, 9:19.5, 19.5:9, 9:20, 20:9) | no | Output image shape. |
| resolution | string (enum) (1K, 2K) | no | 1K ≈ 1 MP, 2K ≈ 4 MP. |
| quality | string (enum) (low, medium) | no | Low is faster and cheaper; medium has more detail. (Edits always run at medium.) |

```bash
curl -X POST https://cheapergen.com/api/v1/run/xai/grok-imagine-image/text-to-image \
  -H "Authorization: Bearer $CHEAPERGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "Fashion editorial: a model in a sculptural orange coat on a salt flat at noon, harsh shadows, medium format",
  "aspect_ratio": "1:1",
  "resolution": "1K",
  "quality": "medium"
}'
```

### Image Edit — `POST https://cheapergen.com/api/v1/run/xai/grok-imagine-image/edit`

| Param | Type | Required | Description |
|---|---|---|---|
| prompt | string | yes | Describe the shot: subject, action, camera movement, lighting and style. |
| image_urls | string[] (URLs) | yes | 1–3 images to edit or combine. Refer to them as "image 1", "image 2"… in the prompt. |
| aspect_ratio | string (enum) (1:1, 3:4, 4:3, 9:16, 16:9, 2:3, 3:2, 1:2, 2:1, 9:19.5, 19.5:9, 9:20, 20:9) | no | Output image shape. |
| resolution | string (enum) (1K, 2K) | no | 1K ≈ 1 MP, 2K ≈ 4 MP. |

```bash
curl -X POST https://cheapergen.com/api/v1/run/xai/grok-imagine-image/edit \
  -H "Authorization: Bearer $CHEAPERGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "Put the person from image 1 in the jacket from image 2 on a rainy Tokyo street at night",
  "image_urls": [
    "https://cdn.cheapergen.ai/samples/portrait.jpg"
  ],
  "aspect_ratio": "1:1",
  "resolution": "1K"
}'
```

## Getting the result
Jobs are async. Poll `GET https://cheapergen.com/api/v1/generations/{id}` until status is succeeded/failed/canceled, or pass `webhook_url`. Failed generations are refunded automatically.

## FAQ
**How is Grok Imagine Image priced?**
Per image by resolution and quality; edits run at medium quality and each input image adds a cent before our discount. Failed generations are not charged.

**Is this the official Grok Imagine?**
Yes. Requests run on xAI's grok-imagine-image-2.0 through an official xAI API channel.

**Can I use the output commercially?**
Yes, subject to xAI's terms and our Terms of Service.

Grok Imagine Image 2.0 is developed by xAI. Cheaper Gen. provides API access and does not own the model.