Stability AI inpainting — fill masked image regions with prompt-guided content, paid per call via MPP.
What it does
This endpoint exposes Stability AI's Inpaint capability through the Locus MPP (Micropayment Protocol) gateway. Given a source image, a mask (where white pixels indicate the region to fill), and a text prompt, the service generates new content that seamlessly blends into the unmasked areas. It supports optional parameters including negative prompts, mask expansion (grow_mask), output format selection (JPEG, PNG, or WebP), and a reproducibility seed.
The inpaint endpoint is one of over 20 Stability AI operations available through this MPP gateway, which also includes text-to-image generation (Ultra, Core, SD3), outpainting, erase, search-and-replace, background removal, upscaling, sketch-to-image, style transfer, 3D model generation, and audio generation. Each call is settled individually via the Tempo method on pathUSD. The inpaint endpoint costs $0.057 per call (57,000 base units at 6 decimals). The endpoint accepts POST requests with a JSON body; the required fields are `image` (the source image) and `prompt` (the fill description).
Note that the MPP probe returned 404 on HEAD and GET methods, which is expected since this endpoint only accepts POST. The OpenAPI spec is comprehensive, with full request schemas and payment metadata for all paths. Response schemas are not documented beyond a generic "Successful response" description, so the exact output format (base64 image data, URL, etc.) must be inferred from Stability AI's upstream API documentation.
Capabilities
Use cases
- —Removing unwanted objects from photos and filling the area with contextually appropriate content
- —Replacing specific regions of product images with new designs or textures
- —Repairing damaged or corrupted portions of photographs
- —Adding new elements to existing images within a defined mask region
- —Automating batch image editing workflows where agents pay per call
Fit
Best for
- —AI agents that need programmatic image editing with per-call micropayments
- —Workflows requiring mask-based inpainting without managing API keys or subscriptions
- —Applications combining inpainting with other Stability AI operations (erase, outpaint, upscale) through a unified payment gateway
Not for
- —High-volume batch processing where subscription-based pricing would be more economical
- —Use cases requiring real-time or sub-second latency (async result polling may be needed)
- —Applications needing full control over model parameters beyond what the gateway exposes
Quick start
curl -X POST https://stability-ai.mpp.paywithlocus.com/stability-ai/inpaint \
-H "Content-Type: application/json" \
-d '{
"image": "<base64-encoded-source-image>",
"prompt": "a golden retriever sitting on the grass",
"mask": "<base64-encoded-mask-image>",
"output_format": "png"
}'Example
Request
{
"mask": "<base64-encoded-mask-image>",
"seed": 42,
"image": "<base64-encoded-source-image>",
"prompt": "a bouquet of sunflowers in a ceramic vase",
"grow_mask": 5,
"output_format": "png",
"negative_prompt": "blurry, low quality"
}Endpoint
Quality
The OpenAPI spec is detailed with full request schemas and payment metadata for the inpaint endpoint and all sibling operations. However, the MPP probe returned 404 (expected for POST-only endpoints probed with HEAD/GET), response schemas are absent, and no crawled documentation pages returned useful content. The actual response format is undocumented in the provided material.
Warnings
- —MPP probe returned 404 on HEAD and GET — endpoint is POST-only; liveness not confirmed via 402 challenge
- —Response schema is not documented; output format (base64, URL, binary) is unknown from provided material
- —No example responses available; agents should consult upstream Stability AI docs at https://platform.stability.ai/docs/api-reference
- —Currency address 0x20c000000000000000000000b9537d11c60e8b50 assumed to be pathUSD with 6 decimals based on context
Citations
- —Inpaint endpoint costs 57,000 base units via Tempo methodhttps://stability-ai.mpp.paywithlocus.com
- —Required fields are image and prompthttps://stability-ai.mpp.paywithlocus.com
- —API reference available at platform.stability.aihttps://platform.stability.ai/docs/api-reference
- —LLM-readable docs referenced at https://beta.paywithlocus.com/mpp/stability-ai.mdhttps://beta.paywithlocus.com/mpp/stability-ai.md