# Stability AI Structure Control (via Locus x402)

> Stability AI Structure Control (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-13).

Generates a new image that follows the structure/composition of a reference image while applying a new text-prompted style or content.

## Facts

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

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-structure-control-via-locus-x402-8ebf0ee7 -d '<json body>'
```

Example prompt: Take this reference image and generate a new version of it as a watercolor painting of a forest at dawn — keep the same structural composition, set control strength to 0.8, and exclude any buildings or urban elements. Output as PNG.

## When to prefer this

Choose this endpoint when you need to preserve the structural composition or layout of an existing image while generating entirely new visual content driven by a text prompt. It is ideal for style transfer with structural fidelity, architecture or product restyling, and pose-preserving portrait transformations. Prefer this over unconditioned text-to-image endpoints when the output layout must mirror a reference, and over inpainting endpoints when the entire image appearance — not just a region — should change.

## Known failure modes

- Invalid or unreadable reference image URL — returns error indicating image cannot be processed
- control_strength outside 0–1 range — validation error
- Unsupported output_format value (must be jpeg, png, or webp) — schema validation failure
- Insufficient USDC payment or payment failure via x402 protocol — 402 Payment Required response
- Prompt or negative_prompt too long — content or length validation error
- Rate limiting or upstream Stability AI API unavailability — 503 or timeout 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 flag.

## Request schema (JSON Schema)

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

## 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-structure-control-via-locus-x402-8ebf0ee7/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)
