Erase objects from images using Stability AI's inpainting model, paid per call via MPP.
What it does
The Stability AI Erase endpoint removes unwanted objects or regions from images using generative AI inpainting. You supply a source image and an optional mask (white pixels indicate areas to erase), and the model fills in the erased region with contextually appropriate content. Additional parameters let you expand the mask by a configurable number of pixels, choose the output format (JPEG, PNG, or WebP), and set a random seed for reproducibility.
This endpoint is served through the Locus MPP (Micropayment Protocol) gateway at `https://stability-ai.mpp.paywithlocus.com/stability-ai/erase`. Payment is per-call using the Tempo method, settling in pathUSD on Tempo L2. The advertised amount is 57,000 base units of pathUSD (6 decimals), which equals $0.057 per request. The endpoint accepts POST requests with a JSON body. Only the `image` field is required; `mask`, `grow_mask`, `output_format`, and `seed` are optional.
This is one endpoint in a broader Stability AI suite available through the same MPP gateway, which also includes text-to-image generation (Ultra, Core, SD3), inpainting, outpainting, search-and-replace, background removal, upscaling, sketch-to-image, style transfer, 3D model generation, and audio generation. The Erase endpoint is specifically focused on object removal without requiring a text prompt — just point at what to remove and the model handles the rest.
Capabilities
Use cases
- —Removing unwanted objects (people, signs, clutter) from photographs
- —Cleaning up product images by erasing background distractions
- —Automated image post-processing pipelines that need object removal
- —Batch-processing real estate photos to remove personal items
- —Content moderation workflows that need to redact visual elements
Fit
Best for
- —Agents or pipelines needing programmatic object removal from images
- —Pay-per-call usage without API key subscriptions
- —Developers integrating image cleanup into automated workflows
Not for
- —Text-guided inpainting where you want to replace an object with something specific (use the Inpaint endpoint instead)
- —High-volume batch processing where per-call costs at $0.057 may add up versus a subscription plan
- —Real-time video frame editing
Quick start
curl -X POST https://stability-ai.mpp.paywithlocus.com/stability-ai/erase \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <MPP_TOKEN>" \
-d '{
"image": "<base64-encoded-image>",
"mask": "<base64-encoded-mask>",
"output_format": "png"
}'Example
Request
{
"mask": "<base64-encoded-mask-image>",
"seed": 42,
"image": "<base64-encoded-source-image>",
"grow_mask": 5,
"output_format": "png"
}Endpoint
Quality
Full OpenAPI schema with clear request parameters and pricing is available. However, the probe did not capture a live 402 challenge on HEAD/GET (the endpoint is POST-only, so this is expected), no response schema or example response is documented, and the crawl pages all returned 404 (the gateway only serves API paths). Pricing and input schema are well-defined from the OpenAPI spec.
Warnings
- —Probe reported is_live=false because HEAD/GET returned 404; this endpoint is POST-only and likely live — the 402 challenge would appear on POST
- —No response schema documented — output format and structure are unknown beyond the output_format parameter
- —Currency address 0x20c000000000000000000000b9537d11c60e8b50 is assumed to be pathUSD with 6 decimals based on the broader Stability AI OpenAPI context; if decimals differ, the $0.057 price would be incorrect
Citations
- —Erase endpoint charges 57,000 base units via Tempo method with currency 0x20c000000000000000000000b9537d11c60e8b50https://stability-ai.mpp.paywithlocus.com
- —Required field is 'image'; optional fields include mask, grow_mask, output_format, seedhttps://stability-ai.mpp.paywithlocus.com
- —API reference available at platform.stability.aihttps://platform.stability.ai/docs/api-reference
- —LLM-readable docs at beta.paywithlocus.com/mpp/stability-ai.mdhttps://beta.paywithlocus.com/mpp/stability-ai.md