# Stability AI Inpainting via Locus x402

> Stability AI Inpainting via Locus x402 is a paid API for AI agents from stability-ai.x402.paywithlocus.com, paid per call via x402, $0.057/call, status unknown (last checked 2026-09-15).

Fill or replace masked regions of an existing image using a text prompt with Stability AI's inpainting model.

## Facts

- Endpoint: POST https://stability-ai.x402.paywithlocus.com/stability-ai/inpaint
- Price: $0.057/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/stability-ai-inpainting-via-locus-x402-beacfd1f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_C78BcgISLqLS1Hu5ACJHg

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability stability-ai-inpainting-via-locus-x402-beacfd1f -d '<json body>'
```

Example prompt: Take this photo of a living room and use the mask I've drawn over the window to fill that area with a snowy mountain view outside — output as a PNG and exclude any curtains or blinds.

## When to prefer this

Choose this endpoint when you need to selectively edit, replace, or fill a specific region of an existing image guided by a text prompt. It is ideal for object removal, background swapping, region-specific style changes, or restoring damaged areas, as opposed to generating a brand-new image from scratch or upscaling an existing one. Use this over generic image generation when spatial control via a mask is required.

## Known failure modes

- Missing required 'image' or 'mask' field returns validation error
- Mask and image dimensions mismatch causes generation failure
- Invalid output_format value (not jpeg, png, or webp) returns bad request
- Payment failure or insufficient USDC balance blocks the request
- Overly complex or ambiguous prompt may produce poor fill quality
- Seed value out of acceptable range causes parameter error

## How this service works

Generative AI platform for images, 3D models, and audio — text-to-image, editing, upscaling, and more.

## Output

Returns a JSON object containing a 'data' field with the generated image result, a 'payment' object confirming the settled USDC amount, a 'request' object with a unique request ID and a status URL for polling, and a 'success' boolean.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "mask": {
   "type": "string"
  },
  "seed": {
   "type": "number"
  },
  "image": {
   "type": "string"
  },
  "prompt": {
   "type": "string"
  },
  "grow_mask": {
   "type": "number"
  },
  "output_format": {
   "type": "string"
  },
  "negative_prompt": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {},
  "payment": {
   "scheme": "exact",
   "settledUsdc": "0.001000",
   "authorizedMaxUsdc": "0.001000"
  },
  "request": {
   "id": "00000000-0000-4000-8000-000000000000",
   "statusUrl": "/requests/00000000-0000-4000-8000-000000000000"
  },
  "success": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stability-ai-inpainting-via-locus-x402-beacfd1f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from stability-ai.x402.paywithlocus.com](https://www.zero.xyz/host/stability-ai.x402.paywithlocus.com/llms.txt)
