stability-ai/fast-sdxl/inpainting
Fast Sdxl Inpainting by Stability AI - AI-powered image editing, style transfer, and transformation. Edit photos with natural language instructions, remove backgrounds, change styles, and enhance images effortlessly.
PNG, JPEG, WebP, or GIF · 20 MiB maximum
PNG, JPEG, WebP, or GIF · 20 MiB maximum
Example output — click Run to generate your own
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
https://api.sandbase.ai/v1/runstability-ai/fast-sdxl/inpaintingInput Schema
14 parameters · 2 required · 12 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
image | string | Required | The URL of the image to use as a starting point for the generation. |
prompt | string | Required | The prompt to use for generating the image. Be as descriptive as possible for best results. |
mask | string | Optional | The URL of the mask to use for inpainting. |
seed | integer | Optional | The same seed and the same prompt given to the same version of Stable Diffusion will output the same image every time. · Default: null |
loras | object[] | Optional | The list of LoRA weights to use. · Default: [] |
format | string | Optional | The format of the generated image. · Options: jpeg, png · Default: "jpeg" jpegpng |
strength | number | Optional | determines how much the generated image resembles the initial image · Min: 0.01 · Max: 1 · Default: 0.95 |
embeddings | object[] | Optional | The list of embeddings to use. · Default: [] |
request_id | string | Optional | An id bound to a request, can be used with response to identify the request itself. · Default: "" |
aspect_ratio | string | Optional | The aspect ratio of the generated image. · Options: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16 21:916:93:24:35:41:14:53:42:39:16 |
expand_prompt | boolean | Optional | If set to true, the prompt will be expanded with additional prompts. · Default: false |
guidance_scale | number | Optional | The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. · Min: 0 · Max: 20 · Default: 7.5 |
num_inference_steps | integer | Optional | The number of inference steps to perform. · Min: 1 · Max: 65 · Default: 25 |
safety_checker_version | string | Optional | The version of the safety checker to use. v1 is the default CompVis safety checker. v2 uses a custom ViT model. · Options: v1, v2 · Default: "v1" v1v2 |
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model uses asynchronous execution. Submit a request and poll for the result.
- Submit — POST to /v1/run, receive an
id - Poll — GET /v1/run/{id} until status is
completed,failed, ortimeout - Retrieve — Read
outputsfrom the completed response
Code Examples
Ready-to-run snippets
# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "stability-ai/fast-sdxl/inpainting",
"mask": "https://static.sandbase.ai/examples/stability/fast-sdxl/inpainting/input_mask_1.png",
"seed": null,
"image": "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png",
"loras": [],
"format": "jpeg",
"prompt": "a tiger sitting on a park bench",
"strength": 0.95,
"embeddings": [],
"request_id": "",
"expand_prompt": false,
"guidance_scale": 7.5,
"num_inference_steps": 25,
"safety_checker_version": "v1"
}'
# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
-H "Authorization: Bearer YOUR_API_KEY"API README
Stable Diffusion XL
Stable Diffusion XL occupies a clearly bounded position in a image production pipeline under the route stability-ai/fast-sdxl/inpainting. It is best evaluated as a named workflow endpoint rather than as a generic substitute for neighboring versions: planners can assign the route to a specific brief, record the chosen revision, and keep approval history tied to one predictable integration surface from intake through delivery.
A practical rollout of Stable Diffusion XL should begin with source-readiness checks, ownership of the submitted material, an agreed budget, and a written definition of the final inpainting deliverable. Before automation is enabled, the acceptance pass should verify that the returned asset opens correctly, fits the intended downstream toolchain, satisfies the project’s review criteria, and can be reproduced from the stored request and route identity stability-ai/fast-sdxl/inpainting.
Highlights
- Distinct output behavior. For Stable Diffusion XL, for Stable Diffusion XL, direct the localized edit with the mask field instead of treating the whole frame alike In Stable Diffusion XL, this capability is applied through the exact stability-ai/fast-sdxl/inpainting workflow with mask as a relevant request control; the mask control exposes the corresponding choice in this route; the mask control exposes the corresponding choice in this route.
- Creative control. For Stable Diffusion XL, for Stable Diffusion XL, set transformation strength anywhere from 0.01 through 1 In Stable Diffusion XL, this capability is applied through the exact stability-ai/fast-sdxl/inpainting workflow with seed as a relevant request control; the seed control exposes the corresponding choice in this route; the seed control exposes the corresponding choice in this route.
- Workflow fit. For Stable Diffusion XL, for Stable Diffusion XL, attach LoRAs or embeddings when those resources are part of the edit In Stable Diffusion XL, this capability is applied through the exact stability-ai/fast-sdxl/inpainting workflow with image as a relevant request control; the image control exposes the corresponding choice in this route; the image control exposes the corresponding choice in this route.
- Production detail. For Stable Diffusion XL, for Stable Diffusion XL, return JPEG by default or request PNG In Stable Diffusion XL, this capability is applied through the exact stability-ai/fast-sdxl/inpainting workflow with loras as a relevant request control; the loras control exposes the corresponding choice in this route; the loras control exposes the corresponding choice in this route.
Pricing
| Configuration | Price |
|---|---|
| Per request | $0.00125 |
When to Use
| Scenario | Why this model fits |
|---|---|
| Choose Stable Diffusion XL | Use it when the required deliverable is specifically the image inpainting result documented for stability-ai/fast-sdxl/inpainting. |
| Match the source material | Select this route when your inputs naturally map to mask, seed, image, loras. |
| Use its distinguishing capability | For Stable Diffusion XL, direct the localized edit with the mask field instead of treating the whole frame alike In Stable Diffusion XL, this capability is applied through the exact stability-ai/fast-sdxl/inpainting workflow with mask as a relevant request control; the mask control exposes the corresponding choice in this route |
| Plan repeatable production | For Stable Diffusion XL, set transformation strength anywhere from 0.01 through 1 In Stable Diffusion XL, this capability is applied through the exact stability-ai/fast-sdxl/inpainting workflow with seed as a relevant request control; the seed control exposes the corresponding choice in this route |
| Confirm cost and delivery | Use the pricing combinations below and the output contract above when budgeting or automating Stable Diffusion XL jobs. |
Prompt Guide
Build the request around the exact stability-ai/fast-sdxl/inpainting schema. Start with required fields, then add only the controls needed for the intended output; keep URLs reachable and enum values exactly as shown in Technical Specs.
{
"image": "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png",
"prompt": "a tiger sitting on a park bench",
"mask": "https://static.sandbase.ai/examples/stability/fast-sdxl/inpainting/input_mask_1.png",
"seed": 0
}
Technical Specs
| Specification | Value |
|---|---|
| Model ID | stability-ai/fast-sdxl/inpainting |
| Execution mode | async |
| Required inputs | prompt, image |
| Request fields | mask (string, optional); seed (integer, optional); image (string, required); loras (array, optional); format (string, optional, options: jpeg / png); prompt (string, required); strength (number, optional, min 0.01, max 1); embeddings (array, optional); request_id (string, optional); aspect_ratio (string, optional, options: 21:9 / 16:9 / 3:2 / 4:3 / 5:4 / 1:1 / 4:5 / 3:4 / 2:3 / 9:16); expand_prompt (boolean, optional); guidance_scale (number, optional, min 0, max 20); num_inference_steps (integer, optional, min 1, max 65); safety_checker_version (string, optional, options: v1 / v2) |
| Output | url (string); content_type (string) |

