Background Removal API
Remove image backgrounds programmatically with a single HTTP request. Get a clean, transparent PNG back instantly — up to 100 images per hour, completely free.
Endpoint
https://clearbackdrop.com/api/v1/remove-background
Send one image as multipart/form-data
under the field name image.
By default the API streams the transparent PNG straight back in the response body.
Quick start
cURL — save the result as a PNG
# Returns the transparent PNG directly curl -X POST https://clearbackdrop.com/api/v1/remove-background \ -F "image=@photo.jpg" \ -o result.png
Prefer a JSON response with a hosted URL?
curl -X POST \ "https://clearbackdrop.com/api/v1/remove-background?response=json" \ -F "image=@photo.jpg"
Python
import requests url = "https://clearbackdrop.com/api/v1/remove-background" with open("photo.jpg", "rb") as f: r = requests.post(url, files={"image": f}) with open("result.png", "wb") as out: out.write(r.content)
JSON response
When you pass ?response=json:
{
"success": true,
"result_url": "https://clearbackdrop.com/static/images/processed/…png",
"image_size": "1024x768",
"processing_time": 2.41,
"quota": { "limit_per_hour": 100, "remaining": 99 }
}
Rate limits
The free tier allows 100 images per hour per IP address. Every response includes your current usage in these headers:
| X-RateLimit-Limit | Max images per hour |
| X-RateLimit-Remaining | Images left this hour |
| X-RateLimit-Reset | Seconds until the window resets |
Exceeding the limit returns 429 Too Many Requests.
Check your remaining quota any time:
GET https://clearbackdrop.com/api/v1/quota
Duplicate detection: if you send a byte-identical image more than once,
the cached result is returned instantly (look for the
X-Cache: HIT header and
"cached": true in JSON responses)
— no need to store results yourself.
Built for AI agents MCP ready
ClearBackdrop speaks the Model Context Protocol, so AI agents (Claude, Cursor, or your own) can remove backgrounds natively — no glue code, no API key. Connect to the MCP endpoint over Streamable HTTP:
https://clearbackdrop.com/mcp
Add to Claude Code
claude mcp add --transport http clearbackdrop https://clearbackdrop.com/mcp
Or via .mcp.json / any MCP client
{
"mcpServers": {
"clearbackdrop": {
"type": "http",
"url": "https://clearbackdrop.com/mcp"
}
}
}
The server exposes one tool, remove_background:
| image_url | Public HTTP(S) URL of the image (use this or image_base64) |
| image_base64 | Base64-encoded image bytes |
| filename | Optional original filename, e.g. photo.jpg |
| return_image | Optional; also return the PNG inline as base64 image content |
The tool returns the hosted result_url,
dimensions, processing time, and remaining quota as structured JSON. It shares the REST API's rate limit
and duplicate-image cache. Agents discovering the site programmatically can also read
/llms.txt.
Note: always use the non-www host
(clearbackdrop.com) —
the www host redirects and drops POST bodies.
Errors
| Status | Meaning |
|---|---|
| 400 | No image attached |
| 413 | File exceeds 15MB |
| 415 | Unsupported file type |
| 429 | Hourly rate limit reached |
| 500 | Processing failed |
Just need to remove a few backgrounds?
Skip the code — use the web app. Same engine, drag & drop, batch upload.
Open the app