Stability AI API
Provider source (opens in a new tab)- API model ID
Not collected- Access
- Developer account, API key and credits required. Public documentation and contracts reviewed; no inference request was made.
- Regions
- Not established for this endpoint; account availability is not a data-residency guarantee.
- API endpoint URL
- POST https://api.stability.ai/v2beta/stable-image/edit/replace-background-and-relightSource for API endpoint URL (opens in a new tab)
- Request mode
- Asynchronous generation with result pollingSource for Request mode (opens in a new tab)
- Required request fields
- subject_imageSource for Required request fields (opens in a new tab)
- Output formats
- JPEG, PNG, WEBPSource for Output formats (opens in a new tab)
- Seed control
- 0–4,294,967,294; zero or an omitted seed selects randomnessSource for Seed control (opens in a new tab)
- Negative prompts
- SupportedSource for Negative prompts (opens in a new tab)
- Input modalities
- Text, ImageSource for Input modalities (opens in a new tab)
- Output modalities
- ImageSource for Output modalities (opens in a new tab)
- Input file formats
- JPEG, PNG, WEBPSource for Input file formats (opens in a new tab)
- Image input limits
- Each side ≥64 px; 4,096–9,437,184 total pixels; Aspect ratio: 1:2.5–2.5:1Source for Image input limits (opens in a new tab)
- Generation controls
- preserve_original_subject: 0–1, original_background_depth: 0–1, light_source_strength: 0–1Source for Generation controls (opens in a new tab)
- Reference images
- Required subject image, optional background and lighting references; supply a background reference or background promptSource for Reference images (opens in a new tab)
No pinned model selector established for this access path.
JSON or base64 transport does not establish structured model output, streaming or a batch API.
Bounds apply to the principal source image; masks and auxiliary references have their own fields.
Prices retain their published currencies and billing units below.
| Category | Usage | Rate | Unit |
|---|---|---|---|
| Image | Replace Background & Relight1 | $0.08 | successful generation |
Rate conditions
- 8 credits × published $0.01/credit. Direct API flat rate; failed generations are not charged. No text-token or per-question conversion.
Data & enterprise terms
Stability terms permit using content to improve services and describe a training opt-out. This is not a default no-training or zero-retention guarantee. Partner contracts may differ; enterprise terms must be verified separately.
Read the service policy (opens in a new tab)