Skip to main content
Model logo

Grok Imagine 2.0 Image API

  • Text to Image
  • Image to Image

Grok Imagine 2.0 Image is part of the Grok Imagine model familyView all Grok Imagine models

Tap to uploadPNG, JPG, WEBP, GIF · Max 100MB
Output

Your generated image will appear here

Updated

What is the Grok Imagine 2.0 Image API?

The Grok Imagine 2.0 Image API is live on UnificAlly as xai/grok-imagine-2.0-image, from $0.02 per image. Grok Imagine 2.0 Image is the quality-focused image model in the Grok Imagine family. Use xai/grok-imagine-2.0-image for final-quality text-to-image generation and reference-guided edits. Omit image_urls for a fresh generation, or pass 1 to 5 reference images to edit, composite, or restyle them while remaining on the same 2.0 model.

Since 18 October 2026 the model runs on xAI's API by default, which adds quality (low or medium), resolution (1k, 1.5k, or 2k), and fifteen aspect ratios including 21:9 and 5:2, each tier priced per image. Setting enable_nsfw: true switches the request to the grok.com channel instead: NSFW allowed, upsample_prompt honoured, a low 1k image in one of eight ratios (the five classic ones plus 4:3, 21:9, and 5:2).

The former enable_pro input is no longer supported. Speed and quality now have separate model IDs: xai/grok-imagine-1.0-image for speed and xai/grok-imagine-2.0-image for quality.

Grok Imagine 2.0 Image API specs

Model IDxai/grok-imagine-2.0-image
EndpointPOST https://api.unifically.com/v1/tasks
Request typesText-to-image, image editing with reference images
OutputOne image per task
Qualitylow (default) or medium
Resolution1k (default), 1.5k, or 2k
Aspect ratio15 ratios plus auto. Eight ratios with enable_nsfw: true
Reference images1 to 5 image URLs
Rate at low quality, 1k$0.02
Rate at low quality, 1.5k$0.025
Rate at low quality, 2k$0.03
Rate at medium quality, 1k$0.03
Rate at medium quality, 1.5k$0.035
Rate at medium quality, 2k$0.04

Billing is per image, with no subscription, and each input image adds a small per-image charge. The Grok Imagine 2.0 Image pricing guide covers the full rate table.

How to use the Grok Imagine 2.0 Image API

  1. Create an API key on the API keys page.
  2. Send a POST request to /v1/tasks with the model ID and an input object.
  3. Read the task_id from the response, then check the task until it is finished, or pass a callback_url and wait for the result.
curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "xai/grok-imagine-2.0-image",
    "input": {
      "prompt": "A cinematic product portrait with detailed studio lighting",
      "aspect_ratio": "2:3",
      "quality": "medium",
      "resolution": "2k"
    }
  }'

Successful submission returns a task_id. Poll GET /v1/tasks/<task_id> or provide a callback_url to receive the completed image as image_url.

The finished task looks like this:

{
  "code": 200,
  "success": true,
  "data": {
    "task_id": "abc123def456",
    "status": "completed",
    "output": {
      "image_url": "https://files.unifically.com/image/92116e95-8dd4-4cbb-b53f-ee643e1045d8.jpg"
    }
  }
}

Poll the task:

curl https://api.unifically.com/v1/tasks/{task_id} \
  -H "Authorization: Bearer YOUR_API_KEY"

Grok Imagine 2.0 Image API parameters

ParameterTypeDefaultWhat it does
promptstringnoneText description or edit instruction. Required
qualitystringlowlow or medium. API channel only
resolutionstring1k1k, 1.5k, or 2k. API channel only
aspect_ratiostringautoauto, 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 2:1, 1:2, 19.5:9, 9:19.5, 20:9, 9:20, 21:9, or 5:2. With enable_nsfw: true, only 1:1, 2:3, 3:2, 4:3, 9:16, 16:9, 21:9, or 5:2, and the default is 1:1
image_urlsstring[]null1 to 5 reference image URLs. Providing this field activates edit mode. Each input image carries a small per-image charge
enable_nsfwbooleanfalsetrue routes the request to the grok.com channel
upsample_promptbooleantrueLet AI enhance the prompt. grok.com channel only, ignored on the API channel
nsfw_checkbooleanfalseCheck the prompt and input images for NSFW content before generating

Unknown request fields are rejected rather than ignored. A request with enable_nsfw: true that also sets quality, resolution, or a wide aspect ratio is rejected with a 422 before any task is created. The Grok Imagine 2.0 Image API documentation has the full reference.

Image editing request

Pass 1 to 5 reference images in image_urls. The request stays on the same model.

curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "xai/grok-imagine-2.0-image",
    "input": {
      "prompt": "Merge these images into one photorealistic scene",
      "image_urls": [
        "https://example.com/img1.jpg",
        "https://example.com/img2.jpg"
      ]
    }
  }'

NSFW request on the grok.com channel

NSFW output goes through the grok.com channel instead, at the low 1k tier:

curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "xai/grok-imagine-2.0-image",
    "input": {
      "prompt": "A cinematic portrait with detailed studio lighting",
      "aspect_ratio": "2:3",
      "enable_nsfw": true
    }
  }'

Grok Imagine 2.0 Image key features

Quality selected by model ID

Choose xai/grok-imagine-2.0-image directly. There is no Pro toggle and no hidden model switch in the request.

Text-to-image and reference editing

Generate from text alone or add 1 to 5 images for editing. References change the workflow, not the selected model.

Quality and resolution tiers

Pick quality low or medium and resolution 1k, 1.5k, or 2k. Six price points, from quick low 1k renders to medium 2k finals, each billed per image.

Fifteen aspect ratios

Beyond 1:1, 2:3, 3:2, 9:16, and 16:9: 4:3, 3:4, 2:1, 1:2, 21:9, 5:2, 20:9, 9:20, 19.5:9, and 9:19.5, or auto to let the model choose.

NSFW on the grok.com channel

Set enable_nsfw: true and the request runs on the grok.com channel with upsample_prompt honoured. That channel renders a low 1k image in one of eight ratios, including 21:9 and 5:2.

What Grok Imagine 2.0 Image is best for

  • Final campaign assets

    Use the 2.0 quality model after composition and messaging have been approved.

  • Reference-guided product work

    Combine up to 5 references while keeping the request on the quality model.

  • Portraits and hero imagery

    Choose 2:3, 3:2, or 16:9 for polished assets where visual fidelity matters more than iteration speed.

  • Two-stage workflows

    Draft with xai/grok-imagine-1.0-image, then move the winning prompt and references to this model for the quality pass.

FAQs

People also ask about Grok Imagine 2.0 Image

Grok Imagine 2.0 Image is xAI's quality-focused image model for text-to-image generation and reference-guided editing.

Image tasks for xai/grok-imagine-2.0-image authenticate with a key created on the API keys page and sent as a Bearer token. That key both submits to https://api.unifically.com/v1/tasks and fetches the result from /v1/tasks/{task_id}.

The Grok Imagine 2.0 Image API accepts an input with prompt, aspect_ratio, quality and resolution under model xai/grok-imagine-2.0-image. Submission returns a task_id; poll GET /v1/tasks/<task_id> or pass a callback_url, and the completed task holds the picture in output.image_url.

Select xai/grok-imagine-2.0-image. The old enable_pro input has been removed, so quality is selected by model ID instead of a boolean parameter.

No. Passing 1 to 5 image_urls activates edit mode on Grok Imagine 2.0 Image; it never switches to another model.

quality is low (default) or medium, and resolution is 1k (default), 1.5k, or 2k. Each combination has its own per-image price, from low 1k up to medium 2k. Both fields are available when enable_nsfw is off, which is the default.

One. Every task produces exactly one image on both channels, billed at the chosen quality and resolution tier. Send several tasks for several candidates.

Fifteen plus auto, including 21:9, 5:2, 4:3, 3:4, 2:1, and the phone ratios 20:9 and 19.5:9. With enable_nsfw on, eight of them, 1:1, 2:3, 3:2, 4:3, 9:16, 16:9, 21:9, and 5:2, the same set grok.com offers for Quality 2.0.

The channel. With enable_nsfw: true the request runs on xAI's grok.com channel, which allows NSFW output and honours upsample_prompt, but renders a low-quality 1k image in one of eight ratios. Off or omitted, the request runs on xAI's API with the full quality, resolution, and aspect ratio surface. Input images are billed per image on the API channel.

Grok Imagine 2.0 Image guides and comparisons

Review pricing, limits, and tested outputs before running this model.