xAI's Grok Imagine model now supports multi-image editing, enabling users to combine elements from multiple source images into a single edited output. This capability allows for the use of up to three source images per editing request. Users can specify the order of these images in their request, and the output aspect ratio defaults to that of the first input image, though it can be overridden with a specific ratio like "1:1" or "16:9".
Key Points
- The Grok Imagine model facilitates editing using multiple source images.
- Up to three source images can be used for a single image edit.
- Source images can be provided as public URLs, base64-encoded data URIs, or
file_ids from the Files API. - Different input types (URL, base64,
file_id) can be mixed within a single request. - The output aspect ratio defaults to the first input image but can be explicitly set.
- The grok-imagine-image-quality model is specified for image editing tasks.
Context
According to xAI documentation, the Grok Imagine model's multi-image editing feature allows for flexible input methods, including public URLs, base64-encoded data URIs, and file_ids from the Files API. This flexibility extends to mixing these input types within a single request. The documentation provides examples using the grok-imagine-image-quality model, demonstrating how to specify multiple image URLs and a text prompt to guide the editing process. Separately, xAI also details Grok 4.5's image understanding capabilities, where images can be sent as input to interpret visual context in responses, and the grok-imagine-video-1.5 model for generating videos from single images.
Why It Matters
This multi-image editing capability expands the creative possibilities for developers and artists, allowing for more complex visual compositions and manipulations directly through the Grok Imagine API. The ability to combine elements from multiple sources with natural language prompts streamlines workflows for generating specific visual outcomes.
What To Do
- Review the xAI documentation for multi-image editing to understand the API parameters and input requirements.
- Experiment with the provided Python or cURL examples to test multi-image editing with different source image combinations.
- Compare the output aspect ratio behavior when it is defaulted versus explicitly set.
- Explore the Files API Integration section for details on using
file_ids as source images.
Keep Exploring
/atlas/grok-family /atlas/image-models /techniques/multimodal-grounding /studio?pack=foundation