API Stock
/IMAGE/Grok Imagine/grok-imagine-2.0-image
Image
xAI

Grok Imagine 2.0 Image API

Generate batches of images from a text prompt in common aspect ratios.

  • Text to image

Starting at

$0.022

per generation

45% cheaper than fal.ai
2 parameters · 1 price options

Grok Imagine 2.0 Image playground

Input

Text description for image generation

Sign in to run

Runs are charged to your balance.

Output

Output will appear here.

Grok Imagine 2.0 Image API pricing

OptionPrice per generationfal.aiYour savings
Standard$0.022$0.04−45%
1curl -X POST https://api.api-stock.com/api/v1/generation/create \
2 -H "Authorization: Bearer $API_STOCK_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "model": "grok-imagine-2.0-image",
6 "input": {
7 "prompt": "A cinematic shot of a city at dusk",
8 "size": "1:1"
9 }
10 }'

Parameters

NameTypeRequiredDefaultDescription
promptstringYes—Text description for image generation
sizestringNo1:1Image aspect ratioOne of: 1:1, 2:3, 3:2, 3:4, 4:3, 9:16, 16:9

Frequently asked questions

How much does Grok Imagine 2.0 Image cost?

Grok Imagine 2.0 Image starts at $0.022 per generation through the API Stock API. You pay per use from a single prepaid balance — there is no subscription — and the final price scales with parameters such as resolution or duration.

When was Grok Imagine 2.0 Image released?

Grok Imagine 2.0 Image was released on August 7, 2026. It is available through the API Stock API with the same key and prepaid balance as every other model.

How do I get an API key for Grok Imagine 2.0 Image?

Sign up for API Stock, top up your balance by any amount and create an API key in the dashboard — it takes a couple of minutes and needs no contract. The same key works with every model in the catalog, so there is no separate key to obtain for Grok Imagine 2.0 Image.

How do I call the Grok Imagine 2.0 Image API?

Send a POST request to https://api.api-stock.com/api/v1/generation/create with your API key and the model id "grok-imagine-2.0-image". The call returns a task id you poll, or a webhook callback when the result is ready. A ready-to-run example is in the quick start above.

What input parameters does Grok Imagine 2.0 Image accept?

Grok Imagine 2.0 Image accepts 2 input parameters, including the required field(s) prompt. Their types, defaults and allowed values are listed in the parameters table above.

What happens if a Grok Imagine 2.0 Image request fails?

API Stock automatically retries the request on a reserve provider. If every provider fails, the charge is refunded to your balance.

Can I use Grok Imagine 2.0 Image with the same API key as other models?

Yes. Every model on API Stock — video, image, music and chat — shares one API key and one prepaid balance, so you can switch to Grok Imagine 2.0 Image without new credentials.