Last updated: 2026-06-06
Grok Image Models
grok-4-image Parameters
aspect_ratio and resolution are xAI image endpoint extensions. With the OpenAI Python SDK, pass them through extra_body; with cURL or the Node.js SDK, put them directly in the JSON body.grok-4-image Example
Response Example
The live response may includeurl, mime_type, and revised_prompt:
grok-4-image Differences
Use only this safe subset forgrok-4-image:
Do not promise these for
grok-4-image:
- multi-image
n > 1 - guaranteed
b64_jsonoutput sizequalitystyle- image editing
grok-4-image Example
Billing
The live pricing page and usage logs are the source of truth. Grok image models are billed per image, not by input/output tokens.