---
last_updated: 2026-11-27
source_url: https://opper.ai/xai/grok-imagine-image
title: "Grok Imagine Image by xAI"
description: "Grok Imagine Image, xAI's text-to-image generation model supporting many aspect ratios and resolutions up to 2k."
---

# Grok Imagine Image

By [xAI](https://opper.ai/xai).

Grok Imagine Image is xAI's text-to-image generation model that creates images from natural language prompts. It supports a wide range of aspect ratios, including 1:1 for social posts, 16:9 for widescreen, and portrait and landscape formats for photography and presentations, with output resolutions up to 2k.

The model generates images from text prompts with configurable batch generation and output as image URLs or base64. It suits standard content creation workflows where speed matters, and xAI recommends the higher quality variant for new projects that need maximum visual fidelity.

## Available routes

Grok Imagine Image runs on 1 route through the Opper gateway. Its routes and prices, live from the catalogue, are public JSON with no API key needed at https://api.opper.ai/v3/models?q=xai%2Fgrok-imagine-image.

| Provider | Model id | Region | Zero data retention | Training | Price |
| --- | --- | --- | --- | --- | --- |
| [xAI](https://opper.ai/provider/xai) | `xai/grok-imagine-image` | Multi-region | Abuse monitoring | No | $0.02 / generation |

## Key info

- Model id: `xai/grok-imagine-image`
- Input: Text, Image
- Output: Image
- Features: none listed
- Pricing: $0.02 / generation
- Billing: Per generation
- Zero data retention with abuse monitoring
- No training by default

## Pricing

Usage-based pricing, billed per generation, not by token.

| Variant | Price |
| --- | --- |
| Standard | $0.02 / generation |

## Data handling per route

Each route hosting Grok Imagine Image has its own privacy posture, residency, and GDPR terms. Postures are maintained by Opper with a last-verification timestamp.

### xAI — Multi-region

Zero data retention with abuse monitoring: prompts and outputs are kept for up to 30 days for abuse monitoring only, and are not used for training. No training on customer data. GLOBAL; SCCs.

- Zero data retention: With abuse monitoring, 30-day window.
- Training: No training on customer data.
- Logging: Abuse monitoring (30-day retention)
- Abuse monitoring: On by default, keeps nothing
- Caching: Prompt cache
- Transfer mechanism: SCCs

Verified by Opper on 2026-10-15.

## Get started

Call Grok Imagine Image through the Opper gateway with one API key. Image models run on Opper's images endpoint: POST /v3/images returns the image in the response, as base64 by default.

See the [Opper images guide](https://docs.opper.ai/build/multimodal/images) and the [Opper multimodal skill](https://skills.opper.ai/opper-multimodal/SKILL.md).

Grok Imagine Image is a premium model on Opper. Sign up needs no credit card: you get an API key straight away and the free models work in the playground and the API. Add a card to use premium models, pay-as-you-go with no minimum.

### Set it up with your agent

Paste this into a coding agent like Claude Code, Cursor or Codex and it will wire up Opper for you:

```text
Use curl to download, read and follow: https://skills.opper.ai/opper-multimodal/SKILL.md Generate an image with Grok Imagine Image
```

### Or call it directly

cURL:

```bash
curl -s https://api.opper.ai/v3/images \
  -H "Authorization: Bearer $OPPER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "xai/grok-imagine-image",
    "prompt": "A watercolor lighthouse on a cliff at sunrise",
    "aspect_ratio": "1:1",
    "quality": "medium"
  }' \
  | jq -r '.data[0].b64_json' | base64 --decode > image.png

# To edit an image, add "image": "https://..." (or a file_<id>) to the body
```

JavaScript:

```javascript
import { writeFile } from "node:fs/promises";

const res = await fetch("https://api.opper.ai/v3/images", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.OPPER_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "model": "xai/grok-imagine-image",
    "prompt": "A watercolor lighthouse on a cliff at sunrise",
    "aspect_ratio": "1:1",
    "quality": "medium"
  }),
});
const { data } = await res.json();
// Each image comes back as base64 (b64_json) unless you ask for a url
await writeFile("image.png", Buffer.from(data[0].b64_json, "base64"));
```

## Use Grok Imagine Image in your apps

Pick your tool to see how to run it on Grok Imagine Image through Opper.

- [Claude Code](https://opper.ai/apps/claude-code/grok-imagine-image)
- [Claude Cowork](https://opper.ai/apps/claude-cowork/grok-imagine-image)
- [Codex](https://opper.ai/apps/codex/grok-imagine-image)
- [DeepSeek Harness](https://opper.ai/apps/deepseek-harness/grok-imagine-image)
- [GitHub Copilot CLI](https://opper.ai/apps/github-copilot-cli/grok-imagine-image)
- [Aider](https://opper.ai/apps/aider/grok-imagine-image)
- [Goose](https://opper.ai/apps/goose/grok-imagine-image)
- [Droid](https://opper.ai/apps/droid/grok-imagine-image)
- [OpenCode](https://opper.ai/apps/opencode/grok-imagine-image)
- [Pi](https://opper.ai/apps/pi/grok-imagine-image)
- [OpenClaw](https://opper.ai/apps/openclaw/grok-imagine-image)
- [Hermes](https://opper.ai/apps/hermes/grok-imagine-image)
- [Copilot for Obsidian](https://opper.ai/apps/obsidian-copilot/grok-imagine-image)
- [OmniRoute](https://opper.ai/apps/omniroute/grok-imagine-image)
- [Cursor](https://opper.ai/apps/cursor/grok-imagine-image)
- [Cline](https://opper.ai/apps/cline/grok-imagine-image)
- [Continue](https://opper.ai/apps/continue/grok-imagine-image)
- [Kilo Code](https://opper.ai/apps/kilo-code/grok-imagine-image)
- [GitHub Copilot](https://opper.ai/apps/github-copilot/grok-imagine-image)
- [Zed](https://opper.ai/apps/zed/grok-imagine-image)
- [JetBrains AI Assistant](https://opper.ai/apps/jetbrains-ai-assistant/grok-imagine-image)
- [Voidleap Code](https://opper.ai/apps/voidleap-code/grok-imagine-image)
- [n8n](https://opper.ai/apps/n8n/grok-imagine-image)
- [LibreChat](https://opper.ai/apps/librechat/grok-imagine-image)
- [Open WebUI](https://opper.ai/apps/open-webui/grok-imagine-image)
- [See all apps](https://opper.ai/apps)

## Other models from xAI

- [Grok 4.7](https://opper.ai/xai/grok-4-7)
- [Grok 4.6](https://opper.ai/xai/grok-4-6)
- [Grok 4.5](https://opper.ai/xai/grok-4-5)
- [Grok 4.3](https://opper.ai/xai/grok-4-3)
- [Grok 4.20 Non-Reasoning](https://opper.ai/xai/grok-4-20-0309-non-reasoning)
- [Grok 4.20 Non-Reasoning](https://opper.ai/xai/grok-4-20-non-reasoning)
