Get your API key forGrok Imagine API: image generation API
One key for Grok Imagine and every other top image and video model. Create your API key in minutes and start generating from your code, one request at a time.
1curl https://aiwings.io/api/v1/images \2-H "Authorization: Bearer $AIWINGS_API_KEY" \3-H "Content-Type: application/json" \4-d '{5"prompt": "An anime-style empty train platform at night in the rain",6"model": "grok-imagine",7"quality": "1K",8"aspect_ratio": "20:9",9"wait": true10}'
What the API can make.
Real, unedited images made with AiWings, each in a different style and shape. Open any image full size, then copy the exact prompt to try it yourself.
Oil painting, in seconds
4:3 · 1152 × 864 px
Show the promptHide the prompt
A dramatic baroque oil painting still life in the style of the Dutch masters: a tarnished brass pocket watch, a melting candle with a trembling flame, a half-peeled lemon and a crystal wine glass that contains a tiny glowing spiral galaxy instead of wine. Deep chiaroscuro lighting, visible brush strokes, craquelure on the paint, warm umber shadows, museum quality. No people.
Anime-style scenes at 20:9
20:9 · 1280 × 576 px
Show the promptHide the prompt
A beautiful hand-painted anime film background of an empty rural train platform at night in light rain: a single glowing vending machine casting colored reflections on wet concrete, a flickering fluorescent lamp, a small shelter with a bench, power lines against a deep indigo sky and one distant train headlight approaching through the mist. Soft cinematic color grade, delicate paint-texture clouds, nostalgic and quiet. No people.
Photorealistic fantasy
1:1 · 1024 × 1024 px
Show the promptHide the prompt
Photorealistic wildlife photograph of a red fox sleeping curled up inside a hollow tree stump lined with softly glowing blue-green moss, surrounded by dozens of fireflies and tiny floating spores in a dark misty forest. Every whisker and strand of fur catches the magical light, shallow depth of field, shot on an 85mm lens at f/1.8, calm and enchanting.
Restyle a reference image
1:1 · 1024 × 1024 px
Show the promptHide the prompt
Redraw the coffee bag from the reference image as a vintage 1950s illustrated advertisement: the same bag in the center, painted in bold gouache with a limited palette of cream, tomato red, mustard and teal, with radiating sunburst lines behind it, a few cartoon coffee beans and steam swirls, and visible printed paper grain. No people.
Phone wallpapers at 9:20
9:20 · 576 × 1280 px
Show the promptHide the prompt
A tall phone wallpaper of a giant translucent jellyfish drifting through the deep ocean, its bell patterned with a glowing constellation of tiny stars, long ribbon tentacles trailing down in soft cyan and violet bioluminescence, particles of marine snow, dark navy water fading to black at the bottom. Calm, minimal, ultra-clean composition with empty space at the top for a clock.
Simple per-image pricing.
Each image costs a fixed number of credits, charged when the job starts and refunded automatically if it fails. Credits are shared with every other model.
- 1K image
$0.030
per image · 3 credits
Images per month
- Basic · $9333
- Pro · $19666
- Scale · $391,333
Prices are shown at the top-up rate of $0.01 per credit. Plans include more credits per dollar, so subscribers pay a little less.
- Maker
- xAI
- Model id (API)
grok-imagine- Reference images
- Up to 1
- Output
- PNG, saved to your library
- Aspect ratios
- 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, auto
- Resolutions
- 1K
One key. Every model.
Pick a model and see the real request. Every image model shares one format, so switching is changing the model and nothing else.
1curl https://aiwings.io/api/v1/images \2-H "Authorization: Bearer $AIWINGS_API_KEY" \3-H "Content-Type: application/json" \4-d '{5"prompt": "A vintage poster for a desert oasis city",6"model": "grok-imagine",7"quality": "1K",8"aspect_ratio": "1:1",9"wait": true10}'
- Model id
grok-imagine- Cost
- $0.030
- 3 credits per image at 1K See Grok Imagine →
Prefer your AI agent? Use it there too.
The same model works in Claude, ChatGPT, Cursor and any MCP client. Connect AiWings once and just ask for it by name.
ClaudeMake a 20:9 anime-style empty train platform at night in the rain with Grok Imagine.
How to set up Claude →- ChatGPT
Open the AiWings upload widget, then redraw my product photo as a 1950s illustrated ad with Grok Imagine.
How to set up ChatGPT → - Cursor
Generate a tall 9:20 phone wallpaper of a glowing jellyfish with Grok Imagine and save it to public/wallpaper.webp.
How to set up Cursor →
Using another tool? Any MCP client works too. See the MCP docs →
Monthly credits for images and videos.
$9/month
- 1,000 credits per month
- Works in any AI agent (MCP)
- Full API access
- Every image and video model
- Top-up packs anytime
- Cancel anytime
$19/month
- 2,000 credits per month
- Works in any AI agent (MCP)
- Full API access
- Every image and video model
- Top-up packs anytime
- Cancel anytime
$39/month
- 4,000 credits per month
- Works in any AI agent (MCP)
- Full API access
- Every image and video model
- Top-up packs anytime
- Cancel anytime
5 free credits when you sign up, no card required. Credits work for images and videos. See what credits buy
Grok Imagine API, answered.
Create an API key in your AiWings dashboard, then send a POST request to /v1/images with the model set to grok-imagine. The same request format works for every image model, so you can switch models by changing one field.
Start building with Grok Imagine.
Create a key and make your first request in a minute.
5 free credits · No card required · Cancel anytimeGrok is a product name of xAI. AiWings is an independent service and isn't affiliated with or endorsed by xAI.