Skip to main content
  • 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.
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.

Key facts

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.

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

1

Confirm the model and price

Open model pricing, verify that the token can see grok-imagine-image-2.0, and check its current price.
2

Generate one image first

Start with n=1, 1K, and Low. Download the image and inspect its actual dimensions, content, and call record.
3

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.
Minimal text-to-image request. Replace the placeholder with your LaoZhang API key; the download step uses jq:
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 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:
Expected result: data[0].url points to one 1248×832 JPEG (3:2) that combines the product, scene, and style from the three references.
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.

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 before large batches and use call records as the final billing source. General service and billing rules are governed by the 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.