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
| Name | Type | Description |
|---|---|---|
| image_file | file | The image, as multipart form data. JPG, PNG or WebP up to 25 MB. |
| image_url | string | Alternative to image_file — a public http(s) URL. |
| image_file_b64 | string | Alternative — base64-encoded image data. |
| size | string | full (default, costs 1 credit) or preview (free, max 640px). |
| format | string | png (default), jpg or webp. |
| bg_color | string | Hex colour to flatten onto, e.g. #ffffff. Omit for transparency. |
| async | bool | Return 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." } ] }
| Status | Meaning |
|---|---|
| 401 | Missing or invalid API key |
| 402 | Out of credits |
| 422 | The image could not be read, or is too large |
| 429 | Rate limit exceeded (60/min) |
| 500 | Processing failed — your credit is refunded automatically |