Image model API
Grok Imagine Image 2.0 API
x-ai/grok-imagine-image-2.0 is xAI's advanced image generation and editing model, designed to create high-quality visuals from text prompts and transform existing images using reference-based instructions. It combines strong prompt understanding with realistic rendering, making it suitable for creative design, marketing, product visuals, and image editing workflows. The model supports both text-to-image generation and image editing, with low and medium quality modes, allowing platforms to balance generation quality and cost. OpenRouter currently lists it at $0.04 per image, with a 66K context
- Model id
grok-imagine-image-20- Takes
- Text (required)
- Makes
- Image
- Endpoint
POST /api/v1/images/generations- Made by
- xAI
- Mode
- Synchronous
Call Grok Imagine Image 2.0
https://payload.rentprompts.com/api/v1. Replace the placeholder with your key.Model grok-imagine-image-20
POST /api/v1/images/generations
curl https://payload.rentprompts.com/api/v1/images/generations \
-H "Authorization: Bearer rp_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-image-20",
"prompt": "A lighthouse at dusk, watercolor",
"n": 1
}'Replace rp_live_YOUR_KEY with your key, ideally via the RENTPROMPTS_API_KEY environment variable. Keys are shown only once, so they are never filled in here. Get your API key →
What a typical call costs
- 1 image8.2 Joules
- 4 images32.8 Joules
Send requests to POST /api/v1/images/generations. Grok Imagine Image 2.0 answers synchronously: the result comes back in the response to the same request.