This is the full technical reference. New here? Start with the Object Removal API overview or the Molixa API platform.
Get access
The API is for approved B2B partners. Apply at /partners (or from your dashboard under Object Removal API). Once approved you get a secret mlx_ key — use it server-side only. Lost it? Rotate a fresh one any time from your dashboard.
Base URL & auth
All requests are HTTPS. Authenticate with your secret key in the X-Api-Key header (or Authorization: Bearer). Send X-Owns-Content: true to affirm the uploader owns or has the rights to edit the image (required, DMCA flow-down).
POST https://molixa.app/api/v1/images/object-remove
X-Api-Key: mlx_your_secret_key
X-Owns-Content: trueThe endpoint
POST /api/v1/images/object-remove — send the image as multipart image (PNG/JPEG/WebP, ≤12MB), or JSON { "imageUrl": "https://…" }. Tell us what to remove, in order of precedence:
- boxes (recommended — most accurate): the object region(s) as
[{ x, y, w, h }]in pixels, or 0–1 fractions of the image. Best when the object sits in a known spot (e.g. a corner) — we mask exactly that and inpaint it. - mask: a PNG the same size as the image, white = remove.
- nothing: we auto-detect the region to remove. Conservative by design — if it can’t find a clear object it returns
NOT_DETECTEDand keeps your original (it never damages the image).
Charges 80 credits per finished removal from your shared credit balance (the same credits power the AI Content Writer API); an auto NOT_DETECTED is refunded.
# remove the object in the bottom-right corner precisely
curl -X POST https://molixa.app/api/v1/images/object-remove \
-H "X-Api-Key: $MOLIXA_OBJECT_API_KEY" -H "X-Owns-Content: true" \
-F "[email protected]" \
-F 'boxes=[{"x":0.70,"y":0.90,"w":0.28,"h":0.08}]'Response — 200 OK
{
"ok": true,
"image": "https://…r2.dev/wm/…/out.png", // CDN URL of the cleaned image
"jobId": "…",
"auto": true,
"creditsRemaining": 4823
}Errors
All errors are JSON with a 4xx status and a stable code:
| Status | code | Meaning |
|---|---|---|
| 422 | NOT_DETECTED | Nothing to remove — keep the original (credit refunded). |
| 422 | REMOVE_FAILED | Processing failed (credit refunded). |
| 429 | RATE_LIMITED | Retry after ~2s. |
| 402 | INSUFFICIENT_CREDITS | Out of credits — top up. |
| 401 / 403 | NO_KEY · INVALID_KEY · PARTNER_NOT_APPROVED | Auth. |
| 403 | SCOPE_FORBIDDEN | Key not enabled for the Object Removal API. |
| 400 | AFFIRMATION_REQUIRED · BAD_INPUT | Missing X-Owns-Content / bad image. |
Quick test
curl -X POST https://molixa.app/api/v1/images/object-remove \
-H "X-Api-Key: $MOLIXA_OBJECT_API_KEY" \
-H "X-Owns-Content: true" \
-F "[email protected];type=image/png"Node / TypeScript
const form = new FormData();
form.append("image", fileBlob, "photo.png");
const res = await fetch("https://molixa.app/api/v1/images/object-remove", {
method: "POST",
headers: {
"X-Api-Key": process.env.MOLIXA_OBJECT_API_KEY!, // server-side only
"X-Owns-Content": "true",
},
body: form,
});
const data = await res.json();
if (data.ok) {
// data.image is a CDN URL — store it as the cleaned listing image
}Recommended integration (marketplaces)
Detect-gated, non-destructive, opt-in — the highest-quality pattern:
- Per uploaded photo, show a “Remove object” button (don’t auto-process every upload).
- On click, POST the image from your server (the secret key never touches the browser).
NOT_DETECTED→ “no object found”, keep the original.ok:true→ show a before / after; the user confirms to replace, else keeps the original. Always keep the original.- Bulk: run multiple photos concurrently, show per-photo status.
Compliance
Your upload terms must include an ownership affirmation (“I own these images or have the rights to edit them, and will not remove others’ marks or attribution”). Only send X-Owns-Content: true for users who accepted it.
Pricing
Prepaid credits — one balance for both APIs. Each removal is 80 credits. Bigger packs cost less per credit:
| Pack | Price | Credits | Images |
|---|---|---|---|
| Starter | $50 | 50,000 | 625 |
| Growth | $90 | 99,000 | 1,237 |
| Scale | $230 | 276,000 | 3,450 |
| Enterprise | custom | — | — |
Ready to integrate? Apply for API access →