Grok Imagine Image
xAI
Grok Imagine Image
POST
Grok Imagine Image
Generate images with xAI’s Grok Imagine model
Authorizations
API Key for API endpoints
Body
A text description of the image you want to generate
Input image for image-to-image generation
Aspect ratio of the generated image
Available options:
1:1, 2:3, 3:2, 3:4, 4:3, 9:16, 16:9 Format of the output image
Available options:
jpg, png, webp Number of results to generate (1-4)
Required range:
1 <= x <= 4Response
Generation submission accepted
Generation id.
Queue status
Available options:
IN_QUEUE, IN_PROGRESS, COMPLETED, FAILED, CANCELED Normalized input payload for the generation task.
Credit usage breakdown for the request
Machine-readable generation error code. Present when status is FAILED.
Sanitized human-readable failure message. Present when status is FAILED.