> ## Documentation Index
> Fetch the complete documentation index at: https://docs.laozhang.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Grok Imagine Image 2.0 API launch

> grok-imagine-image-2.0 launched on September 3, 2026 with 1K/2K output, 15 aspect ratios, up to 10 images per request, and three-reference editing.

* **Published**: September 3, 2026
* **Last verified**: September 3, 2026
* **Current status**: Active

LaoZhang API provides `grok-imagine-image-2.0` at **\$0.055 per successfully returned image**. Text-to-image supports 1K/2K, Low/Medium, 15 fixed aspect ratios, and up to 10 outputs per request. Image editing accepts one to three reference files through an OpenAI-compatible multipart endpoint.

<Info>
  The exact model ID is `grok-imagine-image-2.0`, including the final `.0`. The legacy `grok-imagine-image` and `grok-imagine-image-quality` models remain available, and existing calls do not need to migrate immediately. See the [legacy Grok Imagine model notice](/en/announcements/grok-imagine-2-2026-08).
</Info>

## Key facts

| Item | Detail |
| - | - |
| Model ID | `grok-imagine-image-2.0` |
| Text-to-image | JSON `POST /v1/images/generations` |
| Image editing | Multipart `POST /v1/images/edits` |
| Reference count | One to three |
| Resolution | `1k` and `2k` |
| Quality | Explicit `low` or `medium` is recommended |
| Aspect ratios | 15 fixed values |
| Outputs per request | `n=1–10` |
| Response format | `url` or `b64_json` |
| Billing | Per successful output image |

<Warning>
  Editing currently requires multipart file uploads. xAI's JSON image objects and four- or five-reference requests are outside this launch scope. Do not retry these known input-boundary failures as if they were temporary outages.
</Warning>

## Who should care

* Developers who need 1K and 2K output at one per-image price;
* Content, advertising, and commerce apps that need 1K/2K, Low/Medium, and varied landscape or portrait layouts;
* Workflows that combine a subject, scene, and style from two or three references;
* Teams using the OpenAI Python SDK that want to change only the base URL, API key, and model ID.

Applications that require xAI JSON editing, four or five references, 4K, mask inpainting, a reproducible `seed`, or arbitrary pixel dimensions should not migrate directly.

## What to do

<Steps>
  <Step title="Confirm the model and price">
    Open [model pricing](https://api.laozhang.ai/account/pricing), verify that the token can see `grok-imagine-image-2.0`, and check its current price.
  </Step>

  <Step title="Generate one image first">
    Start with `n=1`, 1K, and Low. Download the image and inspect its actual dimensions, content, and call record.
  </Step>

  <Step title="Add only the parameters you need">
    Test the exact 2K, Medium, aspect ratio, batch count, or reference-editing combination used in production instead of starting at maximum batch size.
  </Step>
</Steps>

Minimal text-to-image request. Replace the placeholder with your LaoZhang API key; the download step uses `jq`:

```bash theme={null}
export LAOZHANG_API_KEY="YOUR_LAOZHANG_API_KEY"

curl -sS "https://api.laozhang.ai/v1/images/generations" \
  -H "Authorization: Bearer $LAOZHANG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-imagine-image-2.0",
    "prompt": "A cobalt-blue ceramic mug on pale stone, clean product photo, no text",
    "n": 1,
    "aspect_ratio": "1:1",
    "resolution": "1k",
    "quality": "low",
    "response_format": "url"
  }' \
  -o grok-generation.json

curl -sS -o grok-mug.jpg "$(jq -r '.data[0].url' grok-generation.json)"
```

The response lists the image URL in `data[0].url`. The URL is temporary, so download it promptly. See the [Grok Imagine Image API integration guide](/en/api-capabilities/grok-imagine-image) for Python, all 15 aspect ratios, full parameter details, and error handling.

## Three-reference editing

Repeat `image[]` for each file. Upload order maps to image 1, image 2, and image 3 in the prompt. Run the command in the folder that contains `product.png`, `scene.jpg`, and `style.jpg`:

```bash theme={null}
curl -sS "https://api.laozhang.ai/v1/images/edits" \
  -H "Authorization: Bearer $LAOZHANG_API_KEY" \
  -F "model=grok-imagine-image-2.0" \
  -F "prompt=Place the product from image 1 in the scene from image 2, and apply the style from image 3. Preserve the product colors." \
  -F "image[]=@product.png" \
  -F "image[]=@scene.jpg" \
  -F "image[]=@style.jpg" \
  -F "aspect_ratio=3:2" \
  -F "response_format=url" \
  -o grok-edit.json

curl -sS -o grok-edit.jpg "$(jq -r '.data[0].url' grok-edit.json)"
```

Expected result: `data[0].url` points to one 1248×832 JPEG (3:2) that combines the product, scene, and style from the three references.

<Warning>
  The current limit is three references. Reject a fourth file in the client. A known over-limit request may return HTTP 500 and should not be retried automatically.
</Warning>

## Pricing and billing

Billing is per successfully returned image, not per HTTP request. A successful `n=4` request is charged for four images (\$0.22) and `n=10` for ten images (\$0.55). A three-reference edit that returns one image is charged for one image.

1K/2K and Low/Medium currently share the same LaoZhang public price. Pricing may change with service costs. Recheck the [console](https://api.laozhang.ai/account/pricing) before large batches and use call records as the final billing source. General service and billing rules are governed by the [Terms](https://www.laozhang.ai/terms).

## Known boundaries

* `quality="high"` is not allowed and should be rejected by the client;
* `resolution="4k"` is not supported;
* four- and five-reference editing is not supported;
* xAI JSON image-editing requests are not currently supported;
* URL outputs are temporary and should be downloaded promptly;
* Medium and 2K can take substantially longer than 1K Low, so use a 180-second production hard timeout.

## Frequently asked questions

### Is Grok Imagine Image 2.0 charged per request or per output image?

Per successfully returned image. A successful `n=10` response with ten images is charged for ten images. If a request fails without returning an image, check the call record for the final charge.

### How many reference images can I upload?

One to three through multipart file upload. Four and five references are not currently supported.

### Do 1K, 2K, Low, and Medium have the same price?

Yes. The current LaoZhang public price per successful output image is the same for all four. Latency and service costs vary by tier, so this may change.

### Why can I not copy xAI's JSON editing example directly?

LaoZhang API currently accepts OpenAI-compatible multipart uploads for editing. JSON image objects return HTTP 400, so use the file-upload example in the integration guide.

### Must legacy model users migrate now?

No. `grok-imagine-image` and `grok-imagine-image-quality` remain available. Migrate only after a matched-prompt test shows that 2.0's quality, aspect ratios, or three-reference editing better fits the task.

## Sources and related documentation

* [xAI Grok Imagine Image 2.0 model](https://docs.x.ai/developers/models/grok-imagine-image-2.0) — official model ID and resolution/quality pricing
* [xAI image generation](https://docs.x.ai/developers/model-capabilities/images/generation) — official aspect ratios, quality, resolution, and batch parameters
* [xAI image editing](https://docs.x.ai/developers/model-capabilities/images/editing) — xAI's JSON editing format, which differs from LaoZhang's current multipart interface
* [Grok Imagine Image API integration guide](/en/api-capabilities/grok-imagine-image) — LaoZhang generation, three-image editing, SDK, pricing, and errors
* [Legacy Grok Imagine model notice](/en/announcements/grok-imagine-2-2026-08) — `grok-imagine-image` and `grok-imagine-image-quality`
* [LaoZhang model pricing](https://api.laozhang.ai/account/pricing) — current models, groups, and public prices


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.