Skip to content
youbot
Grok Imagine Image 2.0 cover

Grok Imagine Image 2.0 API

grok-imagine-image-2-text-to-image
xAICommercial use API verifiedImage generation

xAI's Grok Imagine 2.0 — fast, stylised image generation with up to 12 images per request.

by xAI

Get Your API Key
View as Markdown

Pricing: Grok Imagine Image 2.0 costs 2.2 credits per image (≈ $0.022).

Save up to 67%with the $1,250 top-up pack (+10% bonus) — 63% lower than direct rates even without itTop up

24H Status Monitor

Operational
24h agonow
Loading…

Affordable Grok Imagine Image 2.0 API on you.bot

Access xAI's Grok Imagine Image 2.0 through one unified API — same model, better rates, one integration.

Grok Imagine Image 2.0 API pricing & guide (2026)

xAI's Grok Imagine 2.0 — fast, stylised image generation with up to 12 images per request. Through you.bot you call the Grok Imagine Image 2.0 API by xAI on the same unified endpoint as every other model — one key, one integration.

On you.bot, the Grok Imagine Image 2.0 API costs about $0.022 per image — roughly 63% cheaper than the official xAI price of $0.06. You only pay for successful generations; failed tasks are never charged.

Billing is pay-as-you-go in credits (1 credit = $0.01 USD) — no subscription, no monthly minimum, and credits never expire. So Grok Imagine Image 2.0 API pricing in 2026 is easy to predict: you pay per successful call and nothing for failures.

Core capabilities of the Grok Imagine Image 2.0 API

High-fidelity generation

Create photoreal or stylized images with precise, prompt-driven control.

Editing & reference images

Edit existing images or guide the output with one or more reference images.

Flexible sizes & formats

Pick aspect ratios, resolutions and output formats that fit your product.

Where the Grok Imagine Image 2.0 API fits in production

Every image below was generated on you.bot with the Grok Imagine Image 2.0 API itself — no stock photography.

Catalogue runs at scale

Catalogue runs at scale

Hundreds of SKUs from one prompt template, fired in parallel on a single key.

Campaign and advertising stills

Campaign and advertising stills

Production-quality campaign frames where the set and the light are parameters, not another shoot.

Stills that carry on into video

Stills that carry on into video

Settle the frame here, then hand the same image to a video model on the same key.

Editorial and lifestyle scenes

Editorial and lifestyle scenes

Put the product in a room, a street or a season instead of on a white background.

Packaging mockups

Packaging mockups

See the box, the label and the finish before anything goes to print.

Food and menu imagery

Food and menu imagery

Consistent plating and light across a whole menu.

How to access and deploy the Grok Imagine Image 2.0 API on you.bot

Step 1

Get your API key

Create a key in the dashboard — one key works across every model on the platform.

Step 2

Call the Grok Imagine Image 2.0 endpoint

POST your prompt and parameters to /api/v1/generate with your key in the Authorization header.

Step 3

Poll for your result

Use the returned taskId to poll the task endpoint, or register a webhook to receive the result URLs.

curl -X POST https://you.bot/api/v1/generate \
  -H "Authorization: Bearer sk-live-..." \
  -H "Content-Type: application/json" \
  -d '{
    "modelId": "grok-imagine-image-2-text-to-image",
    "input": { "prompt": "..." }
  }'

Grok Imagine Image 2.0 API on you.bot vs going direct

Featureyou.botGoing direct
Price per image$0.022$0.06
Failed-task billingFree (auto-refund)Charged
IntegrationOne unified APIPer-vendor SDKs
Credit expiryNeverVaries

4.9

Based on 1,200+ developer reviews

Why choose you.bot for the Grok Imagine Image 2.0 API

63% cheaper

Lower rates than going direct to xAI — and you only pay for successful runs.

Production-grade reliability

Monitored availability with automatic credit refunds on failed jobs.

One API for everything

Swap models freely without touching your integration or juggling vendors.

FAQs about the Grok Imagine Image 2.0 API

Grok Imagine Image 2.0 is billed per image at about $0.022 on you.bot — and you only pay for successful generations.

xAI

Grok Imagine Image 2.0 API code example

POST/api/v1/generate

xAI's Grok Imagine 2.0 — fast, stylised image generation with up to 12 images per request.

Overview

Grok Imagine Image 2.0 runs in two steps: POST /api/v1/generate to start a task, then poll GET /api/v1/task/{taskId} until the result is ready.

Authentication

All requests require a Bearer Token in the header:

Authorization: Bearer YOUR_API_KEY

Request parameters

ParameterTypeRequiredDescription
modelIdstringYesModel id: `grok-imagine-image-2-text-to-image`
inputobjectYesInput parameters object (see below)
callbackUrlstringNohttps URL we POST the finished task to. Signed with `X-Webhook-Signature` once you create a webhook signing key in Dashboard → Settings

input object parameters

ParameterTypeRequiredDescription
promptstringYesWhat to generate. Required, up to 10,000 characters. · default: Ultra-photorealistic avant-garde fashion editorial of an original futuristic dragon, square 1:1. A sleek black cyberpunk dragon styled like a high-fashion icon, wearing elegant asymmetrical couture, flowing black fabric, sculptural chrome accessories, glossy leather details and futuristic jewelry. Sophisticated, rebellious, strange and effortlessly cool — not bulky, not military, not generic fantasy. The dragon stares directly into the camera with a sharp, confident, slightly arrogant expression. Head lowered slightly, eyes locked on the lens. Elegant S-curve neck, body angled diagonally, one wing dramatically raised, the other partially folded, tail sweeping through the frame. A slim glowing chrome crystal is held between its teeth. Background: clean vivid golden-yellow studio backdrop. Add minimal bright-red geometric shapes and diagonal lines arranged around the dragon in a sophisticated triangular composition. High-end luxury fashion photography, large-format camera, 50mm lens, dramatic studio lighting, realistic shadows, authentic fabric and chrome reflections, detailed reptilian skin, individual scales, natural imperfections, subtle film grain. Yellow + red + black dominant color palette. Bold, graphic, premium, unconventional, iconic. The final image must look like a real luxury fashion campaign photographed in a professional studio, not CGI or a videogame render. Minimal editorial text: “NO ORDINARY BEAST”. No logos, watermark, copyrighted characters, extra limbs, duplicated wings, malformed anatomy, bulky armor or generic cyberpunk design.
sizestringNoFraming of the generated image. (options: 1:1, 2:3, 3:2, 3:4, 4:3, 9:16, 16:9) · default: 1:1
nstringNoHow many images to generate. Each delivered image is charged. (options: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12) · default: 1

Query task status

GET/api/v1/task/{taskId}?model=grok-imagine-image-2-text-to-image

When state is success, the output is in resultUrls:

{ "state": "success", "resultUrls": ["https://…/api/file?t=…"] }

Error codes

CodeDescription
200Request successful
400Invalid request parameters
401Authentication failed — check API Key
402Insufficient account balance
403IP not allowed for this key, or the key is restricted to other models
404Task not found, or it has expired
409Duplicate request — an identical submit arrived moments ago. Nothing was charged; retry is safe
413Payload too large — see the character and file-size limits for this model
429Rate limit exceeded — retry after the Retry-After header
500Internal server error
504Upstream timed out — nothing was delivered; retry is safe
Request
curl --location 'https://you.bot/api/v1/generate' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "modelId": "grok-imagine-image-2-text-to-image",
    "input": {
        "prompt": "Ultra-photorealistic avant-garde fashion editorial of an original futuristic dragon, square 1:1.\n\nA sleek black cyberpunk dragon styled like a high-fashion icon, wearing elegant asymmetrical couture, flowing black fabric, sculptural chrome accessories, glossy leather details and futuristic jewelry. Sophisticated, rebellious, strange and effortlessly cool — not bulky, not military, not generic fantasy.\n\nThe dragon stares directly into the camera with a sharp, confident, slightly arrogant expression. Head lowered slightly, eyes locked on the lens. Elegant S-curve neck, body angled diagonally, one wing dramatically raised, the other partially folded, tail sweeping through the frame. A slim glowing chrome crystal is held between its teeth.\n\nBackground: clean vivid golden-yellow studio backdrop.\n\nAdd minimal bright-red geometric shapes and diagonal lines arranged around the dragon in a sophisticated triangular composition.\n\nHigh-end luxury fashion photography, large-format camera, 50mm lens, dramatic studio lighting, realistic shadows, authentic fabric and chrome reflections, detailed reptilian skin, individual scales, natural imperfections, subtle film grain.\n\nYellow + red + black dominant color palette. Bold, graphic, premium, unconventional, iconic.\n\nThe final image must look like a real luxury fashion campaign photographed in a professional studio, not CGI or a videogame render.\n\nMinimal editorial text: “NO ORDINARY BEAST”.\n\nNo logos, watermark, copyrighted characters, extra limbs, duplicated wings, malformed anatomy, bulky armor or generic cyberpunk design.",
        "size": "1:1",
        "n": "1"
    },
    "callbackUrl": "https://your-domain.com/api/callback"
}'
Response
{
  "taskId": "281e5b0…f39b9",
  "creditsCharged": 2.2
}