Switchx Image To Image
Model Overview
Setup your API Key
API Schema
URL of the source image to recomposite. Allowed formats: JPEG, PNG, WEBP. Source must not exceed 2,770,000 total pixels.
URL of the alpha mask. Required when alpha_mode is "custom" or "select"; ignored for "auto" and "fill". A mask video for video-to-video, a mask image for image-to-image.
URL of the reference image defining the target look and lighting for the replaced region. Allowed formats: JPEG, PNG, WEBP. At least one of reference_image_url or prompt must be provided.
Subject masking strategy: "auto" (AI auto-detects the subject), "fill" (no masking), "select" (propagate a mask from one keyframe), or "custom" (frame-by-frame mask supplied via alpha_url). Defaults to "auto".
autoPossible values: Maximum output resolution (longer side) in pixels: 720 or 1080. Defaults to 1080. 1080 costs more than 720.
1080Possible values: Frame index (0-based) whose mask is propagated when alpha_mode is "select" on a video. Defaults to the first frame. Ignored for image generation and for the auto, fill, and custom modes.
Random seed (0–4294967295) for reproducibility. Omit for a random seed. The seed used is always returned in the response.
Text description of the desired output to guide the generation (max 2000 characters). At least one of prompt or reference_image_url must be provided.
Successful response.
Successful response.
Quick Example
Example #2: Combine two images

"Place this image with the t-rex on this mug from the second image as a print. Make it look fit and natural."Last updated
Was this helpful?






