grok-imagine-image-2.0
A production-focused image generation and editing model with strong instruction following, typography, local edits, multi-image composition, and visual consistency.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Must be one of: grok-imagine-image-2.0.
grok-imagine-image-2.0 Required. Up to 5000 Unicode characters. Whitespace-only prompts are not allowed.
Conditional limits:
- prompt must not contain only whitespace
1Omit for text-to-image generation. Provide 1 to 3 images for editing or reference-based generation. Valid inline images must be prepared as provider-accessible URLs.
3Selects the SKU and output unit price. The current Router does not support 1.5K. Defaults to 2K.
1K, 2K Selects the SKU and output unit price independently of the output resolution. Defaults to medium.
low, medium Request 1 to 10 images. Omitted or zero values fall back to 1 in code. Final billing must use the actual output count. Defaults to 1.
1 <= x <= 10Only for requests without reference images. The Provider defaults to 1:1 when omitted. Omit this field for editing; do not set a global size default.
Conditional limits:
- size is not allowed for image editing; omit this field
16x9, 19.5x9, 1x1, 1x2, 20x9, 2x1, 2x3, 3x2, 3x4, 4x3, 9x16, 9x19.5, 9x20 Response
Business response. code=0 means the task was accepted; validation failures can return HTTP 200 with code=400.