x402image
MCP · x402 · USDC on Base

Image tools your AI agent can
call and pay for, per use.

x402image is an MCP server of deterministic image-processing tools — remove background, AI upscale, resize, optimize. Your agent discovers them, pays a few cents per call over x402, and gets a finished image URL back. No account, no API key, no image library to install.

POST https://x402image.org/mcp Call service_info first — it's free.

Built for agents, not people

The customer here is another program. An AI agent maintaining a store's product photos has the recipe (which edits, what parameters) and the ingredients (an image URL) — but no kitchen (compute, image libraries). x402image is the kitchen: it takes the recipe, does the work, and hands back the plated result.

Tools & pricing

Each tool is independently priced per call. Prices below are reference values — the authoritative, live price and parameter schema always come from service_info and the 402 quote.

Tool Price What it does
remove_background $0.02 Isolate the subject and cut out the background (BiRefNet AI segmentation). Optional fill color, or a transparent cutout.
upscale $0.02 Enlarge with AI super-resolution (ESRGAN) for a sharper result at a target width and/or height.
resize $0.005 Resize or crop to an exact width/height, with fit and gravity controls (e.g. keep faces in frame).
optimize $0.005 Convert format (webp/avif/jpeg/png/gif) and/or compress to shrink file size at a chosen quality.
process dynamic Run an ordered pipeline of the ops above in a single paid call — one payment, one output. Price is the sum of the included ops.

How payment works

Pay per call, over x402

Call a paid tool without payment and you get an HTTP 402 with a machine-readable quote: price, currency, recipient, how to retry.

USDC on Base

Settlement is USDC on the Base network through a Coinbase CDP facilitator. No sign-up, no stored card, no invoice.

Pay first, work second

The image is processed only after settlement confirms. If the work fails, you are not charged. Output is a short-lived signed URL that expires and is deleted automatically.

Connect an agent

Point your MCP client at the endpoint

Send JSON-RPC over POST https://x402image.org/mcp. Any MCP-compatible agent works — no keys to provision.

Discover with service_info

The free service_info tool returns the current tool list, per-call prices, and how to pay. Read it before you spend.

Call a tool with an image URL

Pass a source image URL (https only; private/internal addresses are refused). Pay the 402 quote, receive the processed image URL.

# discover — free, no payment
POST https://x402image.org/mcp
{"method":"tools/call","params":{"name":"service_info"}}

# process a product photo: cut out background, then resize to 800px
{"method":"tools/call","params":{"name":"process","arguments":{
  "source":"https://example.com/product.jpg",
  "steps":[{"op":"remove_background","params":{"background":"white"}},
           {"op":"resize","params":{"width":800}}]
}}}