remove.ac · Independent guide
Migrating from api.remove.bg/v1.0/removebg to remove.ac
Parameter-by-parameter mapping, payload size limits, HMAC ticket streaming up to 25 MB, and cURL, Python, Node.js and MCP examples.
Published · Sources checked · 阅读中文版
Independent technical migration guide from remove.ac. remove.ac is an independent service and is not affiliated with remove.bg, Canva or Leonardo.Ai.
When remove.bg's self-service API stops accepting requests on December 1, 2026, teams with existing scripts calling POST https://api.remove.bg/v1.0/removebg have two choices: rewrite their request, auth and JSON response parsers for Leonardo.Ai's v2 endpoint, or point existing v1.0 multipart/JSON clients at POST https://remove.ac/v1.0/removebg with an X-Api-Key: rac_live_... header.
1. Endpoint, authentication and 1-line swap
remove.ac implements the core remove.bg v1.0 HTTP contract across multipart/form-data, application/json, and application/x-www-form-urlencoded bodies. It returns raw image bytes (or a JSON Base64 payload when you send Accept: application/json) together with X-Credits-Charged, X-Width, X-Height, X-Type and X-Foreground-Top/Left/Width/Height headers.
# Before: https://api.remove.bg/v1.0/removebg
# After: https://remove.ac/v1.0/removebg
curl -f -X POST https://remove.ac/v1.0/removebg \
-H "X-Api-Key: rac_live_YOUR_API_KEY" \
-H "Idempotency-Key: order-1042-front" \
-F "[email protected]" \
-F "size=auto" \
-F "format=png" \
-o shoe-cutout.png2. Parameter-by-parameter compatibility & differences
| Parameter / Header | remove.ac behavior & differences to note |
|---|---|
| image_file / image_file_b64 / image_url | Supported. image_file_b64 accepts raw Base64 or data:image/...;base64, prefixes. image_url blocks private/loopback DNS targets and does not follow HTTP redirects. |
| size | preview / small / regular (0.25 credits, up to 0.25 MP); medium (1.5 MP), hd (4 MP), 4k (10 MP), full / auto (1 credit, up to 25 MP; up to 40 MP via ticket). |
| format & channels | format: auto, png, jpg, jpeg, webp, zip. channels: rgba (default) or alpha (8-bit grayscale matte). semitransparency defaults to true. |
| type & type_level | type: auto, person (switches to portrait BiRefNet weights), product, car, animal, graphic, transportation. type_level (none, 1, 2, latest) is accepted for compatibility and ignored. |
| roi, crop, scale, position | Supported: roi (% or px box), crop=true/false, crop_margin (% or px), scale (10%–100% or original), position (center, original, or X% Y%). |
| bg_* & shadow_* | bg_color (hex), bg_image_file / bg_image_file_b64 / bg_image_url, add_shadow, shadow_type (auto, car, drop, soft, contact, reflection, none), shadow_opacity (0–100). |
| Accept: application/json | Returns { data: { result_b64, foreground_top, foreground_left, foreground_width, foreground_height } } plus X-Foreground-* headers. |
3. Handling files over 4.4 MB up to 25 MB / 40 MP
Direct serverless calls to POST /v1.0/removebg cap request bodies at 4.4 MB and response bodies at 4.3 MB. If a lossless PNG cutout exceeds 4.3 MB, the gateway returns HTTP 413 and releases your credit hold before capture (0 credits charged). For high-resolution studio originals up to 25 MB / 40 MP, either pass a public image_url or use single-use HMAC ticket streaming (POST /v1.0/removebg/ticket), which our official Node.js SDK, Python SDK, CLI and MCP server negotiate automatically:
// Node.js 18+ / TypeScript (auto-switches to /v1.0/removebg/ticket above 4 MB)
import { RemoveAcClient } from "remove-ac";
import fs from "node:fs/promises";
const client = new RemoveAcClient({ apiKey: process.env.REMOVE_AC_API_KEY });
const { buffer, creditsCharged, width, height } = await client.removeBackground(
"./studio-24mp.png",
{ size: "full", format: "png" },
);
await fs.writeFile("studio-24mp-cutout.png", buffer);# Python (standard requests; or: pip install git+https://github.com/szp2005/remove-ac-sdk.git)
import os, requests
resp = requests.post(
"https://remove.ac/v1.0/removebg",
headers={"X-Api-Key": os.environ["REMOVE_AC_API_KEY"]},
files={"image_file": open("product.jpg", "rb")},
data={"size": "auto", "crop": "true", "crop_margin": "5%"},
timeout=60,
)
resp.raise_for_status()
open("product-cutout.png", "wb").write(resp.content)4. MCP server for AI coding agents & local QA
If your team runs cutouts from Claude Desktop, Cursor, Windsurf or Antigravity, remove-ac ships a zero-dependency stdio MCP server exposing remove_background_file, remove_background_url and get_account_balance:
{
"mcpServers": {
"remove-ac": {
"command": "npx",
"args": ["-y", "-p", "remove-ac", "remove-ac-mcp"],
"env": { "REMOVE_AC_API_KEY": "rac_live_YOUR_API_KEY" }
}
}
}Every verified account includes 10 full-resolution welcome credits, valid for 30 days, to test the live API sandbox before purchasing credits. For manual edge inspection (including interactive Select subject and the Erase and Restore brush), open the free on-device editor or 50-file batch queue.
Sources
Official provider documents and public datasets referenced in this guide. Provider policies, pricing and endpoints can change; check original pages before deploying.
- remove.ac Developer API & Live Sandbox
Full /v1.0/removebg parameter contract, status codes, FEFO credit holds and HMAC ticket streaming.
- remove-ac-sdk (Node.js, Python & MCP Server)
Open-source MIT client libraries, CLI and Model Context Protocol stdio server.
- remove.bg API shutdown notice
Official notice ending self-service api.remove.bg requests on December 1, 2026.
Independent editorial material from remove.ac. This page does not announce a partnership, endorsement or official-successor relationship with the providers mentioned.