# Grok Imagine Image

Grok Imagine Image costs $0.02 per image on LLM API. It generates images from text.

Model ID: `grok-imagine-image` · xAI · Image generation
Updated: 2026-11-26
Canonical: https://llmapi.ai/models/grok-imagine-image/

- Per image: $0.02
- Modes: Generate

## Pricing

Served by xAI, the only provider.

| Price | Amount | Per |
| --- | --- | --- |
| Image | $0.02 | per image |

**Volume pricing.** At higher monthly volume, Grok Imagine Image may cost less. Book a call and sales will quote a price for your usage. [Book a call with sales](https://meetings.hubspot.com/julia-andriienko/llmapi) or [Create an account first](https://app.llmapi.ai/signup).

## Specifications

- Modes: Generate

## Call Grok Imagine Image

### Generate (`POST /v1/images/generations`)

Set LLMAPI_KEY to your LLM API key.

```python
import base64
import os

from openai import OpenAI

client = OpenAI(
    base_url="https://api.llmapi.ai/v1",
    api_key=os.environ["LLMAPI_KEY"],
)

result = client.images.generate(
    model="grok-imagine-image",
    prompt="A lighthouse at dawn, watercolor",
)
with open(f"image.{result.output_format}", "wb") as f:
    f.write(base64.b64decode(result.data[0].b64_json))
```

Docs: [Generate docs](https://docs.llmapi.ai/api/v1/images)

Prices synced 2026-11-26.

Next step: [Get API key](https://app.llmapi.ai/signup)
