Edit - Replace Background and Relight
documentedReplace the background and relight the subject.
POST /v2beta/stable-image/edit/replace-background-and-relightStable Imageno implementation yet0 runsInput
subject_image_path*
Subject image path
Path to subject image file
background_reference_path
Background reference path
Path to background reference image
background_prompt
Background prompt
Prompt for background generation
foreground_prompt
Foreground prompt
Prompt for lighting adjustment
preserve_original_subject
Preserve original subject
0-1
original_background_depth
Original background depth
0-1
light_source_direction
Light source direction
Direction of light (e.g., above, below)
light_reference_path
Light reference path
Path to light reference image
light_source_strength
Light source strength
0-1
seed
Seed
Random seed
output_format
Output format
png|jpeg|webp
Calls Stability AI as you (your API key is your account); keychains.dev holds the credentials.