CutMeOut
API v1

API documentation

One endpoint removes a background. Authenticate with a key from your dashboard and POST an image.

Base URL

https://cutmeout.uk/v1

Authentication

Send your key as a bearer token. Keep it server-side — anyone with the key can spend your credits.

Authorization: Bearer cmo_live_your_key_here

An X-Api-Key header works too.

Remove a background

POST /v1/removebg

By default the call blocks until the render is finished and returns the image bytes directly. For bulk work pass async=1 and poll instead.

Parameters

NameTypeDescription
image_filefileThe image, as multipart form data. JPG, PNG or WebP up to 25 MB.
image_urlstringAlternative to image_file — a public http(s) URL.
image_file_b64stringAlternative — base64-encoded image data.
sizestringfull (default, costs 1 credit) or preview (free, max 640px).
formatstringpng (default), jpg or webp.
bg_colorstringHex colour to flatten onto, e.g. #ffffff. Omit for transparency.
asyncboolReturn a job id immediately instead of waiting.

Example — cURL

# Returns the PNG bytes
curl -X POST https://cutmeout.uk/v1/removebg \
  -H "Authorization: Bearer cmo_live_…" \
  -F "[email protected]" \
  -F "size=full" \
  -o cutmeout.png

Example — Python

import requests

r = requests.post(
    "https://cutmeout.uk/v1/removebg",
    headers={"Authorization": "Bearer cmo_live_…"},
    files={"image_file": open("photo.jpg", "rb")},
    data={"size": "full"},
    timeout=120,
)
r.raise_for_status()
open("cutmeout.png", "wb").write(r.content)

Example — Node

const fd = new FormData();
fd.append("image_file", new Blob([await fs.readFile("photo.jpg")]), "photo.jpg");

const res = await fetch("https://cutmeout.uk/v1/removebg", {
  method: "POST",
  headers: { Authorization: "Bearer cmo_live_…" },
  body: fd,
});
await fs.writeFile("cutmeout.png", Buffer.from(await res.arrayBuffer()));

Asynchronous mode

# 1. Queue the job
curl -X POST https://cutmeout.uk/v1/removebg \
  -H "Authorization: Bearer cmo_live_…" \
  -F "[email protected]" -F "async=1"

# → {"id":"9f2c…","status":"queued","poll":"…/v1/jobs/9f2c…"}

# 2. Poll until status is "done", then fetch result_url
curl https://cutmeout.uk/v1/jobs/9f2c… \
  -H "Authorization: Bearer cmo_live_…"

Account

GET /v1/account returns your remaining credits and usage.

{
  "data": {
    "email": "[email protected]",
    "credits": 184,
    "usage": { "total_images": 316, "this_month": 42 }
  }
}

Response headers

Successful image responses include X-Job-Id, X-Credits-Charged, X-Width and X-Height.

Errors

Errors return JSON with the relevant HTTP status.

{ "errors": [ { "code": "insufficient_credits",
             "title": "You are out of credits. Top up to continue." } ] }
StatusMeaning
401Missing or invalid API key
402Out of credits
422The image could not be read, or is too large
429Rate limit exceeded (60/min)
500Processing failed — your credit is refunded automatically

Ready to build?

Generate a key and make your first call in under a minute.

Get an API key