High-quality image generation with Grok Imagine
input.size is optional. Supported values: 2:3, 3:2, 1:1, 9:16, 16:9.
For image-to-image, input.image_urls is required.
array(URL)
An array containing a single URL string pointing to the reference image.
Please provide the URL of the uploaded file; Accepted types: image/jpeg, image/png, image/webp; Max size: 10.0MB.
All API endpoints require Bearer Token authentication
Get your API Key:
Visit the API Key Management Page to get your API Key
Add it to the request header:
Authorization: Bearer YOUR_API_KEYGrok Imagine Image model identifier
grok-imagine-image Webhook callback URL for result notifications
"https://your-domain.com/callback"
Input parameters for generation. For image-to-image, input.image_urls is required.