API guide · deadline 1 December 2026

Migrating from the remove.bg API

The remove.bg self-service API stops accepting requests on 1 December 2026. Here are the remove.bg parameters mapped to their Deep-Image equivalents, and the same call before and after.

Create a free account and copy your key from My profile → API. Every sample on this page was run against the live API.

At a glance

Endpoint

POST api.remove.bg/v1.0/removebg

POST deep-image.ai/rest_api/process_result

Auth header

X-Api-Key: <remove.bg key>

x-api-key: <Deep-Image key>

Response

image bytes

{"status": "complete", "result_url": …}

JSON with a result URL

The one change every integration needs: remove.bg answers with the image file, Deep-Image answers with JSON and the image is at result_url.

remove.bg

200 OK · image/png

no-bg.pngbinary image bytes

Deep-Image

200 OK · application/json

{
  "status": "complete",
  "job": "c59857c0-…",
  "result_url": "https://…/no-bg.png"
}

Synchronous · closest to remove.bg

POST/rest_api/process_result

Waits for the job (up to about 25 seconds) and returns result_url. If it takes longer, status is not complete: poll the result.

Asynchronous · batches

POST/rest_api/process

Answers at once with a job id. Add "webhooks": {"complete": "https://…"} to get the result posted to you.

Polling

GET/rest_api/result/{job}

Returns the job status and, once complete, its result_url.

Base URL https://deep-image.ai/rest_api. Send JSON, or multipart form data with the image in any file field and the other parameters as a JSON string in a field named parameters.

Parameter mapping

Request

Auth and how the image is sent

X-Api-Key headerx-api-key header

Same header; use your Deep-Image API key.

image_filemultipart file field (any name)

Send other parameters as JSON in a multipart field called parameters.

image_urlurl

Any public image URL.

image_file_b64url

As a data URL: "data:image/jpeg;base64,…".

Background

What happens to the background

typebackground.remove

auto → "auto", person → "human", product / car / animal / transportation → "item".

bg_colorbackground.color

Hex with a leading # ("#81d4fa") or a colour name ("white").

bg_image_urlbackground.replace

URL of the new background image.

Output

Format, framing and size

formatoutput_format

"png", "jpg" or "webp". Use "png" or "webp" to keep transparency.

crop + crop_marginfit: {"crop": "item"} + padding

padding in pixels (40) or percent ("10%").

sizewidth / height

Output is always full resolution. Set width or height to resize; a larger value upscales in the same call.

Before and after

Remove the background from a local file and save a transparent PNG. Pick your language.

Before · remove.bg
curl -H "X-Api-Key: $REMOVE_BG_API_KEY" \
  -F "image_file=@photo.jpg" \
  -F "size=auto" \
  -f https://api.remove.bg/v1.0/removebg -o no-bg.png
After · Deep-Image
rm -f job.json
curl -sf https://deep-image.ai/rest_api/process_result \
  -H "x-api-key: $DEEP_IMAGE_API_KEY" \
  -F "image=@photo.jpg" \
  -F 'parameters={"background": {"remove": "auto"}, "output_format": "png"}' \
  -o job.json

if [ ! -s job.json ]; then
  echo "Request failed" >&2
elif [ "$(jq -r .status job.json)" = "complete" ]; then
  curl -sf -o no-bg.png "$(jq -r .result_url job.json)"
else
  echo "Still processing, poll GET /rest_api/result/$(jq -r .job job.json)"
fi

Remove the background and upscale

remove.bg has no upscaling. Add width or height to a background removal request and the cutout is upscaled in the same job, for 1 credit. A percentage such as "400%" scales relative to the input.

Input photo, 512 by 512 pixels
512 × 512 px input
Transparent cutout upscaled to 2048 by 2048 pixels
2048 × 2048 px cutout
Request
curl -s https://deep-image.ai/rest_api/process_result \
  -H "x-api-key: $DEEP_IMAGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://deep-image.ai/api-example2.jpg",
    "background": {"remove": "auto"},
    "width": 2048,
    "output_format": "png"
  }'
Response
{
  "status": "complete",
  "job": "c59857c0-c0a3-11f1-a1a1-9638fcd7d474",
  "result_url": "https://neuroapi-store.s3…/0254be37-….png"
}

Asynchronous with a webhook

  1. Your app

    POSTs to /rest_api/process with webhooks.complete.

  2. Deep-Image

    Answers at once with a job id, then processes the image.

  3. Your webhook

    Receives job, status and result_url.

  4. Download

    Fetch result_url and store the image.

Request
curl -s https://deep-image.ai/rest_api/process \
  -H "x-api-key: $DEEP_IMAGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://deep-image.ai/api-example2.jpg",
    "background": {"remove": "auto", "color": "#ffffff"},
    "output_format": "jpg",
    "webhooks": {"complete": "https://example.com/deep-image-webhook"}
  }'
POST to your webhook
{
  "job": "ff4620ba-c0a3-11f1-ac5a-a63afc00aaa0",
  "status": "complete",
  "result_url": "https://neuroapi-store.s3…/result.jpg",
  "data": { … the parameters you sent … }
}

No public endpoint?

Skip the webhook and poll the job with its job id until status is complete, then download result_url.

Polling
curl -s https://deep-image.ai/rest_api/result/$JOB \
  -H "x-api-key: $DEEP_IMAGE_API_KEY"

Need a hand?

Our support team helps with migrations: send us your current remove.bg call and we will reply with the Deep-Image equivalent. Full API reference: documentation.deep-image.ai. Comparing providers? See Deep-Image vs remove.bg.