Skip to content
Developers // Object Removal API

Object Remover API reference

Remove any unwanted object — people, text, logos, dates, distractions — from images with one HTTPS call. Auto-detect plus AI inpainting, a clean image back in about two seconds. Server-to-server, framework-agnostic.

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: true

The 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_DETECTED and 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:

StatuscodeMeaning
422NOT_DETECTEDNothing to remove — keep the original (credit refunded).
422REMOVE_FAILEDProcessing failed (credit refunded).
429RATE_LIMITEDRetry after ~2s.
402INSUFFICIENT_CREDITSOut of credits — top up.
401 / 403NO_KEY · INVALID_KEY · PARTNER_NOT_APPROVEDAuth.
403SCOPE_FORBIDDENKey not enabled for the Object Removal API.
400AFFIRMATION_REQUIRED · BAD_INPUTMissing 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:

  1. Per uploaded photo, show a “Remove object” button (don’t auto-process every upload).
  2. On click, POST the image from your server (the secret key never touches the browser).
  3. NOT_DETECTED → “no object found”, keep the original.
  4. ok:true → show a before / after; the user confirms to replace, else keeps the original. Always keep the original.
  5. 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:

PackPriceCreditsImages
Starter$5050,000625
Growth$9099,0001,237
Scale$230276,0003,450
Enterprisecustom

Ready to integrate? Apply for API access →