{"uid":"cap_t44lxXCPyKBWEgm2QXxkE","slug":"delx-commerce-replace-background-0f8493fd","name":"Delx Commerce — Replace Background","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/replace-background?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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."}}},"responseSchema":{"type":"json","example":{"image_url":"https://api.delx.ai/api/v1/generated-replaced-backgrounds/example.png","sale_price_usdc":0.003,"has_transparency":false}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_SnktYq25v2vFrnFh7NegK","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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.","exampleAgentPrompt":"Replace the background of this product photo with a clean studio gray fill — here's the image in base64.","exampleUseCases":[{"title":"E-commerce product photo cleanup","prompt":"Take this JPEG of my sneaker product shot and replace the background with a clean white studio fill (#FFFFFF) so it looks professional for my online store listing — here's the image in base64."},{"title":"Consistent brand photo backgrounds","prompt":"I have a base64-encoded PNG of a team headshot and I want to replace the background with our brand color #1A2B3C so all our team photos look uniform."},{"title":"Quick mockup background swap","prompt":"Here's a base64-encoded WebP image of my prototype gadget — can you replace the background with studio gray so I can use it in a presentation mockup?"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:54.422Z","isFirstParty":false,"canonicalSlug":"delx-commerce-replace-background-0f8493fd"}