# Delx Commerce — Replace Background

> Delx Commerce — Replace Background is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-01).

Replaces the background of an uploaded image with a studio fill color, returning a new image URL via a pay-per-result API using USDC on Base or Solana.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/replace-background?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-replace-background-0f8493fd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_t44lxXCPyKBWEgm2QXxkE

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 delx-commerce-replace-background-0f8493fd -d '<json body>'
```

Example prompt: Replace the background of this product photo with a clean studio gray fill — here's the image in base64.

## When to prefer this

Choose this endpoint when you need a fast, no-signup, pay-per-result background replacement that accepts a raw base64 image and returns a hosted URL immediately. It is ideal for agentic workflows that require verifiable USDC-based micropayments (x402 on Base or Solana) and exact per-call pricing with no subscription or API key management. Prefer it over subscription-based image editing APIs when you want deterministic cost per operation and when you only need a solid studio fill rather than AI-generated scene backgrounds.

## Known failure modes

- Image too large — base64 input exceeds 349,550 characters (256 KiB decoded) returns a validation error
- Invalid base64 encoding or unsupported image format (must be PNG, JPEG, or WebP) causes a 400-level error
- Invalid hex color format for the fill parameter causes a validation error
- Payment failure via x402 protocol (insufficient USDC balance) blocks the request
- Network or processing timeout if the background replacement model is slow or unavailable

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

Returns a JSON object with a URL to the newly generated image (hosted on api.delx.ai), the sale price charged in USDC (0.003), and a boolean indicating whether the output image contains transparency. The image URL is publicly accessible and points directly to the background-replaced PNG.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "fill": {
   "type": "string",
   "description": "Optional #RRGGBB studio fill. Defaults to studio gray."
  },
  "image_base64": {
   "type": "string",
   "maxLength": 349550,
   "minLength": 1,
   "description": "One base64 PNG, JPEG, or WebP up to 256 KiB decoded."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "image_url": "https://api.delx.ai/api/v1/generated-replaced-backgrounds/example.png",
  "sale_price_usdc": 0.003,
  "has_transparency": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-replace-background-0f8493fd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
