Grok Imagine Image Edit
[Core Function] Grok Imagine Image Edit is xAI’s standard image editing model. [Strengths] It excels at quickly applying prompt-guided edits and style changes to one or more source images. [Best For] Highly recommended for: fast restyling, quick variations, and lightweight image edits. [Limitations] Do NOT use this model when maximum edit fidelity is required; the Quality variant preserves more detail. A maximum of 3 source images is supported. [Routing] Choose this model for fast edits. When the user demands maximum fidelity, route to Grok Imagine Image Edit (Quality).
Authorizations
API Key authentication. Format: Bearer YOUR_API_KEY.
Body
xAI Grok Imagine image editing request. Shared by the Quality and standard edit models. A single image is passed as a one-element images array.
Text description of the edit to apply
1"Render this as a pencil sketch with detailed shading"
Source images to edit (1-3). Each item is a publicly accessible image URL or a base64 data URI.
1 - 3 elements1Number of edited images to generate
x >= 11
Aspect ratio of the edited output image
1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 2:1, 1:2, 19.5:9, 9:19.5, 20:9, 9:20, auto "16:9"
Output resolution: 1k (1024px) or 2k (2048px). Defaults to 1k.
1k, 2k "1k"
Format of the returned image data
url, b64_json "url"