A familiar HTTP request is a starting point. Use this checklist to test your images and integration before switching production traffic.
Our production API is live on Cloudflare. D1 handles atomic credit reservations, private R2 stores retry results, and Cloudflare Images runs only for requested post-processing.
Migration checklist
1. Check the requests you use
List your input method, output format, size and editing parameters. This service supports file, HTTPS URL and plain base64 input, but does not implement every remove.bg option. Keep API keys on your server and create a new key on an API-enabled plan.
2. Replace the endpoint and key
For supported HTTP requests, retain the request structure and replace the origin and X-API-Key. If a library hard-codes the remove.bg hostname, use its endpoint override when available or call this API directly with an HTTP client. Do not send a remove.bg key to this service.
Before and after: one file request
Current remove.bg request
curl -H 'X-API-Key: REMOVE_BG_KEY' -F 'image_file=@image.jpg' -F 'size=auto' 'https://api.remove.bg/v1.0/removebg' -o no-bg.pngRemoveBG production request
curl --fail-with-body -H 'X-API-Key: NEW_REMOVEBG_KEY' -F 'image_file=@image.jpg' -F 'size=auto' -F 'format=png' 'https://removebgtool.net/v1.0/removebg' -o no-bg.pngBoth examples use multipart form data and X-API-Key, but they need different keys. The target sets size=auto and PNG explicitly; omitting size and format returns the original-size transparent PNG. The API is live, but test your normal images before switching traffic.
Check these differences before switching
- One input only: image_file, image_url or plain image_file_b64; supported formats are auto, png, jpg and webp. ZIP responses are not supported.
- type=auto, type_level=none and channels=rgba are the only accepted values for those fields. Nonempty options such as shadow, bg_image_url, ROI, crop_margin, scale and position are rejected.
- Omitting size returns the original dimensions. Set an explicit size only when you need a pixel ceiling, and check the actual dimensions and Content-Type in the response.
- Normal success returns image bytes. With Accept: application/json, success returns data.result_b64 and dimensions. Errors use errors[].title and errors[].code.
# Generate one ID per image; reuse it when retrying this request.
REQUEST_ID="$(uuidgen)"
curl --fail-with-body --max-time 180 \
-H 'X-API-Key: YOUR_API_KEY' \
-H "Idempotency-Key: $REQUEST_ID" \
-F 'image_file=@image.jpg' \
'https://removebgtool.net/v1.0/removebg' -o no-bg.png3. Map parameters before testing
Compatibility means a supported request shape, not identical segmentation results. In this implementation type must be auto, type_level must be none and channels must be rgba. Nonempty unsupported parameters are rejected rather than silently ignored.
| Request field | Support here |
|---|---|
| image_file / image_url / image_file_b64 | Choose exactly one input: image_file, image_url or image_file_b64. |
| format | auto, png, jpg or webp. ZIP is not supported. |
| size | Pixel ceilings differ by format. Review the size table and output limits. |
| crop / bg_color | crop=true/false and bg_color are supported. |
| type / type_level / channels | Only auto / none / rgba, respectively. |
| bg_image_url / shadow / roi / crop_margin / scale / position | Not supported: background images, shadows, ROI, crop margins, scale or position. |
4. Check responses and billing
Read the response Content-Type before saving the result. The API returns image bytes by default, or JSON with result_b64 when requested. Check X-Credits-Charged and X-Request-ID. Credits belong to this account; remove.bg keys and credit balances cannot be transferred. Preview and full-resolution calls use the same per-image charge here.
Handle responses, errors and billing
Read the status and response type before saving a file. Preserve X-Request-ID for support and read X-Credits-Charged on success. The API uses an account credit balance at its separately configured per-image rate; website free previews do not apply.
| Response | What it means | Integration action |
|---|---|---|
| 400 | Missing image, invalid input or an unsupported parameter. | Read errors[].code, send exactly one image source and remove unsupported fields. |
| 403 | API key missing, invalid or lacking API access. | Use a new key from an eligible account; never forward the remove.bg key. |
| 402 | insufficient_credits. | Check account balance and the current API charge before retrying. |
| 409 | Request in progress or an Idempotency-Key conflict / expired replay. | Read the error code; retry the same key only when the response tells you to. |
| 429 | Rate or concurrency limit exceeded; Retry-After is returned. | Back off using Retry-After instead of immediately repeating the call. |
| 502 / 503 / 504 | Provider failure, busy service, unavailable runtime or timeout. | Read errors[].code and X-Request-ID; investigate or retry only as appropriate. |
5. Run a representative test set
Test normal product and portrait images, low-contrast edges, each output format, oversized files, invalid keys, unsupported parameters and insufficient credits. Verify your handling of 409, 429, timeouts and processing failures. Keep request IDs so you can investigate a failed call.
Optional Idempotency-Key: reuse the same key, image and parameters to replay a successful result for 10 minutes without another charge. A replay repeats the original X-Credits-Charged and adds X-Idempotent-Replayed: true. In-progress requests return 409. Failed or expired keys remain reserved: use a new key to start a new billable request. Without this header, each request is independent. Allow a client timeout of 180 seconds.
6. Switch gradually and keep a fallback
Route a small part of your own workload to the new integration, then review success rate, output quality and credits. Increase traffic only after the results fit your needs. Keep the previous configuration available while validating. Traffic routing and rollback are managed by your application, not by an automatic switch in this service.
Before changing production traffic
remove.bg’s official API page announces a move to Leonardo.Ai starting December 1, 2026. This is not an announcement that RemoveBG is the official successor. Keep the website move to Canva separate from your API migration plan.
Source reviewed:
Official remove.bg API announcement| Check in your application | What this implementation expects | Acceptance check |
|---|---|---|
| Input | Exactly one of image_file, image_url or image_file_b64. The developer API accepts up to 22 MiB of image data; the browser uploader has a separate 3 MB limit. | Try one valid input of each type you use. An HTTP response alone does not prove that your source image was the intended one. |
| Defaults and output | Omitting size and format returns the original-size transparent PNG. Explicit sizes apply pixel ceilings; formats are auto, png, jpg and webp. ZIP is rejected. | Check Content-Type, actual pixel dimensions and transparency. A larger size ceiling does not guarantee upscaling. |
| Editing options | Only type=auto, type_level=none and channels=rgba are accepted. Nonempty unsupported options such as shadow or bg_image_url return an error. | Remove unsupported settings deliberately; do not assume they have been silently applied. Verify crop and background colour on a sample. |
| Failure and billing | Your integration must handle authentication, credits, conflict, rate-limit and processing errors. Website free previews are not the API billing rule. | Inspect X-Request-ID and X-Credits-Charged on real calls. Follow the API documentation for retry and idempotency handling before increasing traffic. |
The production API is live. These checks are derived from the request parser shipped with this project; verify your own SDK, image quality, latency and required capacity before increasing traffic.
Background remover FAQs
Is this a drop-in replacement for remove.bg API?
No. RemoveBG accepts image_file, image_url or image_file_b64, but defaults and supported editing parameters differ. Map each request field and test the actual response.
Can I reuse my remove.bg API key?
No. Create a RemoveBG account and generate a separate key in API Keys. Old accounts, balances and keys are not imported.
Can I route paid HD API traffic to the current deployment?
Yes. The production API is live. Create a RemoveBG API key, test your supported parameters and outputs, and then switch traffic gradually.
RemoveBG is an independent service and is not affiliated with remove.bg, Canva, or Leonardo.Ai. Existing accounts, credits and API keys do not transfer.