Skip to main content
POST
Playground
Fill in your API key and a prompt, then send. This hits the live API — the same endpoint your code would call.
Requests sent from this page are real and are billed to your key. A single image costs $0.02 to $0.08 depending on the model and tier. Nothing here is a sandbox or a mock.

Parameters

string
required
Which model to run. Accepts grok-imagine-image, grok-imagine-image-2.0 or grok-imagine-image-quality, matched exactly — no aliases.
object
required
The generation parameters. Any key not listed below is rejected with invalid_params.
string
An https URL to POST the finished task to, so you can skip polling. Must be https — anything else is rejected at submit time.

What comes back

Submitting returns immediately, in well under a second. The image is not in this response — generation happens in the background.

Then poll for the result

This playground covers the create call only. Take the id from the response above and read the task until status reaches completed or failed — expect about 7 to 10 seconds.
A finished task carries an outputs array:
Output URLs are unauthenticated and expire 24 hours after the task finishes. usage.cost_in_usd_ticks is the list price; your balance moves by that figure times your group multiplier — see pricing.

Next steps

Overview

Every parameter, the resolution and quality grid, and measured latency.

Async task API

The polling loop, callbacks and the full error table.