curl -X POST https://removegifbg.com/api/v1/jobs \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "file=@input.gif"

Authentication

Every request needs an API key, sent as either header:

Authorization: Bearer bgr_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
X-API-Key: bgr_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Create a key from your dashboard's API Keys panel. The plaintext key is shown exactly once, at creation — if you lose it, revoke it and generate a new one. You can have up to 10 active keys at a time; all of them share one credit balance.

Credits & pricing

Every file processed costs 3 credits, deducted when the job is submitted (before processing starts). A batch request charges for every file in the batch up front — if your balance can't cover the whole batch, nothing in it is created. If a file turns out to be unreadable, that file's credit is refunded automatically.

PlanCreditsPrice
Credit pack — Micro15 (never expire)$1.99
Credit pack — Light150 (never expire)$9.99
Credit pack — Heavy900 (never expire)$39.99
Plus Quarterly2,700 / quarter$79.99/qtr
Pro Monthly3,000 / month$79.99/mo
Pro Annual36,000 / year$799.99/yr

Credits live on your account, not on an individual key — every key you create draws from the same pool. Check your balance any time with GET /api/account (dashboard-session auth, not API-key auth).

Submit a file — POST /api/v1/jobs

Multipart form data:

FieldValuesNotes
filerequired.gif, .mp4, .mov, or .webm
methodauto (default) · fast · rembgfast uses flood-fill instead of AI segmentation — faster, works best on flat-color backgrounds
tolerance832 (default 16)only used by method=fast
croptrue (default) · falseauto-crop to the subject's bounding box
pad050 px (default 12)padding kept around the crop
canvasW / canvasHpxoutput canvas size; omit to keep original size
anchorcenter (default) · bottomsubject placement when scaling to a canvas
outputFormatgif (default) · apng · webm · mp4see note below on mp4
bgColortransparent (default) · #rrggbbrequired for mp4
trimtrue · false (default)auto-trims idle lead-in/trail-out frames — GIF sources only

mp4 output has no alpha channel, so it only makes sense with a solid bgColor — requesting mp4 with a transparent background falls back to gif automatically.

curl -X POST https://removegifbg.com/api/v1/jobs \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "file=@input.gif" \ -F "outputFormat=apng" \ -F "bgColor=transparent"

Response 202:

{ "id": "b165...", "status": "queued", "creditsRemaining": 19, "links": { "self": "/api/v1/jobs/b165...", "download": "/api/v1/jobs/b165.../download" } }

Poll status — GET /api/v1/jobs/:id

curl https://removegifbg.com/api/v1/jobs/b165... \ -H "Authorization: Bearer YOUR_API_KEY"
{ "id": "b165...", "status": "queued | processing | done | failed", "metadata": { "originalName": "input.gif", "inputSize": 372273, "frameCount": 14, "width": 512, "height": 512, "duration": 0.84, "outputSize": 158210 }, "outputFormat": "gif", "previewUrl": "/api/v1/jobs/b165.../preview", "downloadUrl": "/api/v1/jobs/b165.../download", "error": null }

previewUrl appears once a preview is available; downloadUrl only once status is done. A job is only visible to the API key that created it — every other key gets a 404.

Preview & download

GET /api/v1/jobs/:id/preview and GET /api/v1/jobs/:id/download stream the file directly, authenticated the same way as every other call — no separate download token.

Batches — POST /api/v1/batches

Same fields as POST /api/v1/jobs, but repeat the file field once per file (up to 20 files per request). One option set applies to every file in the batch.

curl -X POST https://removegifbg.com/api/v1/batches \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "file=@a.gif" -F "file=@b.gif" -F "file=@c.gif"
{ "id": "batch_...", "jobs": [{ "id": "...", "filename": "a.gif" }], "creditsRemaining": 15 }

GET /api/v1/batches/:id returns { "id", "status": "processing | partial | done", "jobs": [...] } with each entry in the same shape as GET /api/v1/jobs/:id.

Errors

StatusBodyMeaning
401{ "error": "unauthorized" }missing, invalid, or revoked API key
402{ "error": "insufficient_credits", "creditsRemaining" }not enough credits — no job was created
400{ "error": "bad_request" }no valid file, or malformed multipart body
422{ "error": "unreadable_file" }file couldn't be parsed — no credit charged
404{ "error": "not_found" }job/batch doesn't exist, or belongs to a different key
429{ "error": "rate_limited" }too many requests — see Retry-After header

Rate limits

Requests are rate-limited per API key. If you're rate-limited, the response includes a Retry-After header (seconds) — wait that long before retrying. Need a higher limit for a production integration? reach out from your dashboard.

Get an API key