grok-imagine-api
Installation
SKILL.md
Grok Imagine API
Grok Imagine is xAI's image generation and editing API. It supports text-to-image, JSON-based image edits, multi-image edits, multi-turn refinement, batch variations, aspect-ratio control, 1k/2k resolution, URL output, and base64 output.
Use official xAI docs for exact current model availability and pricing when that matters. Do not recommend the deprecated grok-imagine-image-pro; migrate existing uses to grok-imagine-image-quality or the current documented Grok Imagine image model.
Quick start
Raw REST:
curl -X POST https://api.x.ai/v1/images/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $XAI_API_KEY" \
-d '{
"model": "grok-imagine-image",
"prompt": "A collage of London landmarks in a stenciled street-art style"
}'