# Stability AI Search and Replace

> Stability AI Search and Replace is a paid API for AI agents from Stability AI at stability-ai.mpp.paywithlocus.com, paid per call via MPP, $0.057/call, status unknown (last checked 2026-10-10).

Detects a specific object in an image using a text description and replaces it with a newly generated object based on a prompt

## Facts

- Endpoint: POST https://stability-ai.mpp.paywithlocus.com/stability-ai/search-and-replace?utm_source=zero.xyz
- Price: $0.057/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 4
- Provider: Stability AI
- Docs: https://platform.stability.ai/docs/api-reference
- Website: https://stability.ai
- Tags: image-generation, stable-diffusion, upscaling, 3d, ai, media
- Canonical page: https://www.zero.xyz/c/stability-ai-search-and-replace-06675895
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qlQryC5MOjiLnSJriKZxr

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-search-and-replace-06675895 -d '<json body>'
```

Example prompt: In this product photo, find the wooden chair and replace it with a sleek modern black leather office chair — output as a PNG.

## When to prefer this

Use this endpoint when you need to swap or replace a specific identifiable object in an existing image with something new, described in natural language. It is better than full inpainting when you want targeted object-level replacement with automatic mask detection rather than manual masking. Prefer this over outpainting or background replacement when the target is a foreground object within the scene.

## Known failure modes

- Object described in search_prompt not found in image — may result in no change or incorrect region being replaced
- Ambiguous search_prompt causing wrong object to be targeted
- Image format not supported or corrupted input
- Prompt too vague resulting in poor quality replacement
- grow_mask set too high causing replacement to bleed into unintended areas
- Invalid output_format value causing a validation error
- Seed value producing undesirable results requiring retry

## How this service works

Find an object by description and replace it with something new.

## Output

Returns an edited image (jpeg, png, or webp) where the detected object described by the search_prompt has been replaced with a newly generated object described by the prompt, seamlessly composited into the original scene.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "image",
  "prompt",
  "search_prompt"
 ],
 "properties": {
  "seed": {
   "type": "number",
   "description": "Random seed"
  },
  "image": {
   "type": "string",
   "description": "Source image Send a public HTTPS URL (recommended; files up to 10 MiB) or base64/data URI. Hosted MPP JSON requests must stay below 8 KiB, so use a URL for larger files."
  },
  "prompt": {
   "type": "string",
   "description": "What to replace the object with"
  },
  "grow_mask": {
   "type": "number",
   "description": "Expand detection mask by N pixels"
  },
  "output_format": {
   "type": "string",
   "description": "jpeg|png|webp"
  },
  "search_prompt": {
   "type": "string",
   "description": "Description of the object to find and replace"
  },
  "negative_prompt": {
   "type": "string",
   "description": "Things to exclude"
  }
 },
 "additionalProperties": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stability-ai-search-and-replace-06675895/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from stability-ai.mpp.paywithlocus.com](https://www.zero.xyz/host/stability-ai.mpp.paywithlocus.com/llms.txt)
