Control output aspect ratio in multi-image edits
Specify the aspect_ratio parameter to override the default output size based on the first input image.
Override output aspect ratio in multi-image edits.
When using multiple source images for an edit, the output aspect ratio defaults to that of the first image provided. To ensure a specific output dimension, use the `aspect_ratio` parameter and set it to a desired ratio like '1:1' or '16:9'.
To get a square output image from a multi-image edit, set `"aspect_ratio": "1:1"` in your API request.
Control the output aspect ratio for image edits that use multiple source images. By default, the output matches the first input image's ratio, but you can override this using the `aspect_ratio` parameter.
The `aspect_ratio` parameter provides explicit control over the generated image's dimensions, ensuring consistency when needed, regardless of the input images' original sizes.
When the default aspect ratio of the first input image is acceptable or when the API does not support this parameter.
- Multi-Image Editing ↗xAI · xAI Docs: Guides · Aug 27, 2026 · paraphrased
First seen on Subvolts Aug 27, 2026. Updated Sep 11, 2026. Spotted a problem? Tell us.
- Multi-Image EditingxAI · xAI Docs: Guides · Aug 27, 2026
The Playbook: reusable how-tos, prompts, configs and tips pulled out of the news.
- Troubleshooting fixImage Edit Fails to Change Detail: Point to the PartWhen an image edit doesn't work, specify the exact part of the image to change. · 5 min
- HeuristicImage Prompting: Subject First, Then StylePrioritize subject, state, support, and setting before mood, film stock, or things to avoid. · 5 min
- HeuristicChain image edits for iterative refinementLink multiple image editing operations by feeding the output of one edit as the input for the next. · 15 min
- ChecklistImage Generation and Editing Prompting ChecklistChecklist for crafting effective image generation and editing prompts. · 10 min
- HeuristicAdd imperfections for human-like AI videoIncorporate flaws like off-level framing to make AI-generated scenes feel more natural. · 5 min
- Anti-patternAvoid Vague Negative Constraints in Image PromptsDon't use long 'avoid' lists; focus on specific objects or counts instead. · 5 min
Questions people ask
- Which AI tools does this work with?
- The sources used it with Grok.
- Where did this come from?
- xAI (xAI Docs: Guides). Subvolts collected, normalized and credited it; the link above opens the original.

