Object Removal API
A REST API to remove unwanted objects from images. Send an image, get back a clean CDN URL. A brushed or boxed region plus AI inpainting handles logos, text, people, and distractions, and you only pay when a cleaned image comes back.
No subscription. Prepaid credits. One balance for every API.
curl -X POST \
https://molixa.app/api/v1/images/object-remove \
-H "X-Api-Key: mlx_live_…" \
-H "X-Owns-Content: true" \
-F "[email protected]"
# → { "ok": true,
# "image": "https://cdn…/clean.png" }What the Object Removal API does
The Molixa Object Removal API takes an image and returns a cleaned version of it over a single HTTPS request. You POST an image to one endpoint, and the response is a CDN URL of the result. There is no queue to poll, no SDK to install, and nothing to run on your own GPUs.
It removes any region you mark. The same call erases overlaid logos, burned-in text, timestamps, people, signs, and other unwanted objects from a photo, then fills the gap so the result looks like the object was never there. That last part matters: cheap tools blur or box out an object, while this reconstructs the pixels underneath so a corner logo on a product photo or a distraction across a listing image disappears cleanly.
It is built for server-to-server use inside another product. If you run a marketplace, a listings site, an e-commerce catalog, or any app where users upload images they own, you call this endpoint from your backend and store the returned image. The API is framework-agnostic. Anything that can make an HTTP request can use it.
- One endpoint: POST /api/v1/images/object-remove
- Removes logos, text, timestamps, people, distractions, and unwanted objects
- Returns a CDN URL of the cleaned image, not a raw binary you have to host
- No SDK, no local models, no GPU infrastructure on your side
- Prepaid credits, no subscription, and a refund when nothing is removed
# one endpoint · one round-trip
POST /api/v1/images/object-remove
# in → your image (file or URL)
# out → CDN url of the cleaned image
# removes:
objects · people · logos · text · timestamps · distractions
# no SDK · no GPU · no queue to pollHow the AI works: mark the region, then inpaint
Removal happens in two stages. First, you mark what to erase. You brush or box the region to remove, telling Molixa exactly which area of the image should be cleaned. This is the step that gives you precise control over which logo, object, or distraction gets cleared.
- 1
Detect the region
Grounding DINO, an open-vocabulary detector, locates the object, logos, and text you want gone — which is why you can send a photo with no coordinates and still get the right area cleaned.
Grounding DINO - 2
Mask what to erase
The located region is turned into a mask. Detection decides where; you can also override it entirely with your own boxes or a full mask PNG.
auto · boxes · mask - 3
Inpaint the background
LaMa, a large-mask inpainting model, rebuilds the covered pixels — generating plausible texture and structure instead of smearing or cloning, so an object over a pattern comes out clean.
LaMa - 4
Return a clean URL
The reconstructed image is served from a CDN and returned as a URL you store as the new version of the photo. Detection and inpainting stay separate on purpose.
cdn url
Send more detail when you know where the object is; send nothing when you do not. Auto-detect is conservative and refunds when it finds no clear object to remove.
Three ways to tell it what to remove
You control precision by how much you specify. The API accepts three removal modes, in order of precedence. Send more detail when you know exactly where the object is; send a broad region when you do not.
- Region prompt (default): send the image with a brushed or boxed area. Molixa masks that region for you. This mode is conservative. If it cannot find a clear region to clean it returns NOT_DETECTED, keeps your original image untouched, and refunds the credit.
- Precise boxes: pass a JSON array of rectangles as [{ x, y, w, h }]. Coordinates can be pixels or 0 to 1 fractions of the image width and height. Use this when the object sits in a known spot, like a bottom-right corner stamp, so the model masks exactly that region and nothing else.
- Full mask PNG: send a PNG the same size as the image where white marks the pixels to remove. This is the most exact mode and skips the region step entirely. Use it when you already compute a mask yourself or need pixel-level control over an irregular shape.
Supported inputs and outputs
You can send the image two ways. Upload it directly as a multipart file, or reference it by URL and let Molixa fetch it. Both hit the same endpoint and return the same shape.
Accepted formats are PNG, JPEG, and WebP, up to 12MB per image. For a URL, send a JSON body of { imageUrl } pointing at a publicly reachable image. For an upload, send the file as the multipart image field.
The response is JSON. On success you get ok: true and an image field containing a CDN URL of the cleaned result, plus a jobId, an auto flag telling you whether a region was inferred, and your remaining credit balance. You store or serve that URL as the new version of the image. Every error is JSON with a 4xx status and a stable code, so your integration branches on a fixed set of strings rather than parsing prose.
- Inputs: multipart image file (PNG, JPEG, WebP, up to 12MB) or JSON { imageUrl }
- Removal hints: boxes array, mask PNG, or a brushed region
- Output: JSON with a CDN URL of the cleaned image, a jobId, and credits remaining
- Errors: JSON 4xx responses with stable codes like NOT_DETECTED, RATE_LIMITED, INSUFFICIENT_CREDITS
A realistic integration for a marketplace
The pattern that works best in production is region-gated, non-destructive, and opt-in. It keeps costs down, avoids surprising your users, and never destroys an original.
Instead of processing every upload, show a Clean up photo button on each image. When a user clicks it, your server (not the browser) calls the endpoint with the image and the region to remove. If the API returns NOT_DETECTED, show a quiet nothing to remove message and leave the original in place. If it returns a cleaned image, present a before and after view and let the user confirm the swap. Always keep the original stored so nothing is lost if they change their mind.
For bulk workflows, run several photos concurrently and show per-photo status. Because a failed removal or a NOT_DETECTED result is refunded, running cleanup across a whole listing gallery costs you nothing for the photos that had nothing to remove. You pay only for the images that were actually cleaned.
- Add a per-photo Clean up photo button instead of auto-processing uploads
- Call the endpoint from your server so the secret key never reaches the browser
- On NOT_DETECTED, keep the original and tell the user nothing was removed
- On success, show before and after and let the user confirm the replacement
- Keep every original; treat the cleaned image as a new version, not a destructive edit
// detect-gated · non-destructive · opt-in
const res = await clean(photo);
if (res.code === "NOT_DETECTED") {
// keep original · credit refunded
toast("Nothing to remove");
} else {
// show before / after · let user confirm
showDiff(photo, res.image);
}
// pay only for photos actually cleanedWho uses an object removal API
The API fits any product where users upload images they own and an unwanted object or overlay gets in the way of a clean listing. A few common cases:
Marketplaces
Sellers re-upload photos carrying another platform's stamp; clean them so listings look native to your site.
Real estate
Remove a prior agency's logo or a photographer's overlay from property photos the seller has the rights to use.
E-commerce
Remove supplier stamps or sample labels from catalog images you own before they go live on a storefront.
Print-on-demand
Clean source artwork and mockups so overlaid preview marks never end up on the final product.
How it compares to remove.bg and DIY
| Molixa API | remove.bg | Build it yourself | |
|---|---|---|---|
| Price per image | $0.08 | $0.09–0.20 | GPU + engineering |
| Removes any unwanted object | — | you build it | |
| Auto-detects the object | — | you build it | |
| Refund when nothing is found | — | — | |
| Detect-then-inpaint reconstruction | — | you build it | |
| Time to integrate | One API call | One API call | Days to weeks |
| Prepaid, no subscription | — |
Authentication and the ownership affirmation
Enabling the Object Removal API on your partner account mints a scoped API key that only works for this product. You authenticate by sending it in the X-Api-Key header. There are two key types: a secret mlx_ key for server-side calls, and a domain-locked publishable pub_ key you can safely use in a browser widget. Keys are stored as SHA-256 hashes, and you can rotate a fresh one any time from the platform dashboard.
Every removal request must also send X-Owns-Content: true. This header is a rights and DMCA affirmation: it states that the uploader owns the image or has the right to edit it. Your own upload terms should bind users to that affirmation, and you should only send the header for users who accepted it. The API is for removing objects from images you have the rights to, not for stripping other people's content or attribution.
Requests are protected by per-partner rate limits and atomic billing that can never push a balance negative. Actions are recorded in audit logs. If you hit a limit you get RATE_LIMITED; if you run out of credits you get INSUFFICIENT_CREDITS until you top up. All of these come back as JSON with a stable code.
Pricing: 80 credits per image, refunded if nothing is removed
Billing is prepaid credits, with no subscription and no per-seat fee. One credit is worth $0.001. A finished object removal costs 80 credits, which is $0.08 per image at face value.
You are charged only for a result. If the request returns NOT_DETECTED, or processing fails, the 80 credits are refunded. In a region-gated integration that means scanning a gallery is effectively free for every photo that had nothing to remove; you pay for the cleaned images and nothing else.
| Unit | Credits | USD |
|---|---|---|
| 1 credit | 1 | $0.001 |
| Object removal | 80 | $0.08 |
| 10 removals | 800 | $0.80 |
| NOT_DETECTED / failure | 0 | refunded |
| Starter · 50,000 credits | ≈ 625 cleaned images · shared with the Content API | |
- 1 credit = $0.001; object removal = 80 credits = $0.08 per finished image
- Refunded on NOT_DETECTED or failure, so you never pay for a non-result
- Starter: $50 for 50,000 credits (about 625 images)
- Growth: $90 for 99,000 credits, a 10 percent bonus (about 1,237 images)
- Scale: $230 for 276,000 credits, a 20 percent bonus (about 3,450 images)
- One credit balance is shared with the Content Generation API; enterprise volume is custom
One balance, honest pricing
Prepaid credit packs power both APIs. One credit is $0.001, bigger packs cost less per credit, and you only pay for calls that succeed.
- ~625 object removals
- ~250,000 words of content
- $0.0010 per credit
- ~1,237 object removals
- ~495,000 words of content
- $0.0009 per credit
- ~3,450 object removals
- ~1,380,000 words of content
- $0.0008 per credit
Need enterprise volume? Talk to us.
Getting started
You need an approved partner account and a credit balance. Apply at /partners; once approved, enable the Object Removal API from the platform dashboard to mint your key and go live. Then a single curl call cleans an image.
- 1
Apply for access
Apply at /partners; approval is usually one to two business days for B2B partners.
/partners - 2
Enable + mint a key
Enable the Object Removal API from the platform dashboard to mint your scoped key and go live.
/console - 3
Make the first call
One curl call cleans an image; swap in a boxes array or mask PNG to target an exact region.
X-Owns-Content - 4
Read the full docs
Endpoint reference, request and response shapes, every error code, and Node + TypeScript samples.
/object-removal-api
Frequently asked questions
It is a REST endpoint you call from your backend to remove an unwanted object from an image programmatically, instead of editing photos by hand. You POST an image to Molixa's POST /api/v1/images/object-remove endpoint and get back a CDN URL of the cleaned result. The API cleans the region you brush or box, then uses AI inpainting to rebuild the covered area.
Send the image to the endpoint with your X-Api-Key and X-Owns-Content: true. Upload it as a multipart file or reference it as JSON { imageUrl }. Brush or box the region to remove, pass a boxes array of { x, y, w, h } to target an exact area, or send a full mask PNG where white marks the pixels to remove. The response returns a CDN URL of the cleaned image.
A finished removal costs 80 credits, which is $0.08 at face value since one credit is worth $0.001. You are only charged when a cleaned image is returned. If the request finds nothing to remove (NOT_DETECTED) or processing fails, the 80 credits are refunded. Credits are prepaid in packs: $50 for 50,000, $90 for 99,000, or $230 for 276,000, with no subscription.
The region step is conservative by design. If it cannot find a clear area to clean, it returns a NOT_DETECTED response, keeps your original image untouched, and refunds the credit. It never blurs or damages an image it is unsure about. This is what makes it safe to run cleanup across a whole gallery: you pay only for the images that actually got cleaned.
It removes overlaid logos, burned-in text, timestamps, people, signs, and unwanted objects. You brush or box the region, and LaMa inpainting rebuilds what was underneath, so the removed element is reconstructed rather than boxed out or blurred. That broad scope is one difference from background-removal tools like remove.bg, which only strip the background.
remove.bg removes image backgrounds and runs roughly $0.09 to $0.20 per image. Molixa removes logos, text, people, and objects while leaving the rest of the photo intact, at $0.08 per image. If your problem is a stray object or logo on a listing photo rather than the background, this API is the right shape for the job and costs less per image.
PNG, JPEG, and WebP, up to 12MB per image. You can upload the file directly as a multipart image field, or send JSON with { imageUrl } pointing at a publicly reachable image and let Molixa fetch it. The cleaned result is returned as a CDN URL in the response.
Enable the Object Removal API on your partner account to mint a scoped key, then send it in the X-Api-Key header (a secret mlx_ key server-side, or a domain-locked pub_ key in the browser). Every request must also send X-Owns-Content: true, a rights and DMCA affirmation that the uploader owns or has the right to edit the image. Keys are SHA-256 hashed, requests are rate-limited per partner, and actions are logged.
The complete endpoint reference, request and response shapes, every error code, and Node and TypeScript samples live at /object-removal-api. Access is for approved B2B partners: apply at /partners, and once approved, enable the Object Removal API from the platform dashboard to get your key and credits.
Clean images at scale, one call at a time
Sign up, enable the Object Removal API, and drop a single POST into your upload flow.