APIOne API call. Transparent PNG back.
The same model that powers this page is available as a simple HTTP endpoint. No SDK needed — send an image with your API key, get the cutout back as the response body. 1 credit per image, charged only when it succeeds.
Get an API keyPricing
Reference
POST https://removebackground.dev/v1/remove
Authenticate with your API key in the x-api-key header (create one on your account page). Returns the image bytes (image/png or image/webp) with X-Width, X-Height, X-Processing-Ms, X-Credits-Remaining, X-Removal-Id and X-Job-Id headers. Errors return JSON: { "error": { "code", "message" } }
Every image runs as a job in our processing queue. The request usually waits for it and returns the image. If it isn’t done within about 55 seconds (for example when the queue is busy), you get 202 Accepted with the job id, a status_url and a result_url: poll the first, then download the second. You’re charged once, only when the image succeeds.
| Parameter | Type | Description |
|---|
image_file | file | The image to process (JPG, PNG, WebP). Send as multipart form data. |
image_url | string | Public URL of the image — use instead of image_file. |
format | png | webp | Output format. Default png. |
bg_color | hex | Fill the background with a color, e.g. ffffff. Default transparent. |
Parameters can be form fields, JSON keys or query-string values. You can also POST the raw image bytes with Content-Type: image/jpeg.
| Endpoint | Description |
|---|
GET /v1/jobs/:id | Job status JSON: status (queued, processing, succeeded, failed…), done, and per-image result_url. |
GET /v1/jobs/:id/result | The image bytes once the job succeeded (409 while it’s still running). ?item=N for batch jobs. |
POST /v1/batch | Queue up to 100 image_urls in one job (JSON). Answers 202 with the job id at once. |
Job endpoints use the same x-api-key and only show your own jobs.
| Status | Error codes |
|---|
202 | Not an error: still processing after ~55 s. JSON with id, status_url and result_url |
400 | missing_image, invalid_url, fetch_failed, fetch_timeout, invalid_format, invalid_bg_color |
401 | unauthorized — missing, wrong or revoked x-api-key |
402 | insufficient_credits — buy a credit pack to continue |
409 | not_ready — the job is still running (from /v1/jobs/:id/result) |
413 | too_large — image over 25 MB |
422 | processing_failed, invalid_image — the file isn’t a readable image (not charged) |
502 | the image couldn’t be processed on our side after retries (not charged) |