Model Capabilities

Multi-Image Editing

View as Markdown

Use up to three source images for a single image edit. You can specify images in the order they are sent in the request. By default, the output aspect ratio follows the first input image. You can override this by setting the aspect_ratio parameter to a specific ratio, such as "1:1" or "16:9".

Click to select
Merged result combining man and puppyMerged result combining man and womanMerged result combining puppy and womanMerged result combining man and puppy and woman
Select at least 2 source images
import xai_sdkclient = xai_sdk.Client()response = client.image.sample(    prompt="Show all subjects sitting together on the grass in a sunny park. Casual relaxed mood, natural daylight, warm tones. No additional people or animals.",    model="grok-imagine-image",    image_urls=[        "https://docs.x.ai/assets/api-examples/images/image-merge/woman.jpg",        "https://docs.x.ai/assets/api-examples/images/image-merge/man.jpg",        # "<image_url>",    ],    aspect_ratio="3:2",)print(response.url)


Did you find this page helpful?

Last updated: March 23, 2026