Developer API

Remove backgrounds programmatically with one REST call. Every paid account (and free accounts with credits) can generate an API key from Settings.

1 · Authentication

Send your API key as a bearer token. Keys look like vbg_….

# All requests use this header Authorization: Bearer vbg_YOUR_API_KEY

2 · Remove a background

POST /api/v1/remove-background

The endpoint accepts the input in any of three ways and returns the processed PNG binary on success. Each successful (non-demo) call costs 1 credit.

FieldWhereDescription
image_filemultipartRaw image file (JPG, PNG, WebP, GIF — max 10 MB).
image_urlJSONPublic https URL of the image, downloaded for you.
image_file_b64JSONBase64-encoded image data.
bg_colorbothOptional. transparent (default) or a color name / #RRGGBB.

curl — file upload

curl -X POST https://dodo.shewapost.com/api/v1/remove-background \ -H "Authorization: Bearer vbg_YOUR_API_KEY" \ -F "image_file=@photo.jpg" \ -F "bg_color=transparent" \ --output photo-nobg.png

curl — image URL (JSON)

curl -X POST https://dodo.shewapost.com/api/v1/remove-background \ -H "Authorization: Bearer vbg_YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"image_url":"https://example.com/photo.jpg"}' \ --output photo-nobg.png

JavaScript (Node 18+)

const res = await fetch("https://dodo.shewapost.com/api/v1/remove-background", { method: "POST", headers: { Authorization: "Bearer vbg_YOUR_API_KEY", "Content-Type": "application/json", }, body: JSON.stringify({ image_file_b64: Buffer.from(fs.readFileSync("photo.jpg")).toString("base64") }), }); const png = Buffer.from(await res.arrayBuffer()); fs.writeFileSync("photo-nobg.png", png);

Python

import requests r = requests.post( "https://dodo.shewapost.com/api/v1/remove-background", headers={"Authorization": "Bearer vbg_YOUR_API_KEY"}, files={"image_file": open("photo.jpg", "rb")}, ) open("photo-nobg.png", "wb").write(r.content)

3 · Check your balance

GET /api/v1/me Authorization: Bearer vbg_YOUR_API_KEY # 200 OK { "email": "you@company.com", "credits": 297, "plan": "pro", ... }

4 · Response headers & errors

Successful responses include useful headers:

X-Credits-Charged: 1 X-Credits-Remaining: 297 X-Demo-Mode: true when the upstream poof.bg key is not configured
StatusMeaning
200Success — binary PNG in the body.
401invalid_api_key — missing or revoked key.
402insufficient_credits — top up or upgrade.
413Image too large (max 10 MB / 36MP).
415Unsupported or unreadable image.
429Rate limited — slow down (60 requests/minute).
502Upstream processing failed — safe to retry, no credit charged.

Notes

· Upstream removal is powered by the poof.bg API (remove.bg-compatible). · Rate limit: 60 API requests per minute per key. · Failed jobs are never charged.