Xe RemoveBG API
Base URL: https://api.xeboki.com/v1/removebg
The Xe RemoveBG API uses AI to remove image backgrounds in seconds. Submit images by URL or base64, receive a transparent PNG (or fill with a custom colour), and process hundreds of images in parallel with the batch job endpoint.
E-commerce product shots
Strip backgrounds from product images automatically. Ship clean catalogue photos without manual editing.
Profile photo processing
Let users upload profile photos and instantly present them on a consistent brand background.
Marketing & ad creatives
Cut subjects from photos, place on branded gradients, and generate variations at scale.
Bulk batch processing
Submit hundreds of images in a single API call and poll for results as they complete.
GET /v1/removebg/quota. Processed images are available at their result URL for 24 hours.Authentication
All requests require a valid API key in the Authorization header. Create and manage keys at account.xeboki.com .
Authorization: Bearer xbk_live_your_key_hereRequired scopes
removebg:images:process | Process images (single and batch) |
removebg:quota:read | Check credit usage and remaining quota |
removebg:batch:write | Submit batch processing jobs |
removebg:batch:read | Poll batch job status and retrieve results |
Process image
Remove the background from a single image. Submit by public URL or base64-encoded data.
/v1/removebg/processRemove background — from URL
The quickest way to process publicly accessible images. Pass the image URL and receive a result URL back.
Request body
| Parameter | Type | Description |
|---|---|---|
image_urlrequired | string | Publicly accessible URL of the image to process (JPEG, PNG, WebP). |
output_format | string | "png" | "webp" — output format (default: "png"). PNG preserves transparency. |
output_size | string | "preview" (max 0.25MP, fast) | "full" (original resolution, default). |
bg_color | string | Hex colour to fill the background instead of transparent (e.g. "#ffffff"). |
curl -X POST https://api.xeboki.com/v1/removebg/process \
-H "Authorization: Bearer xbk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"image_url": "https://example.com/product-photo.jpg",
"output_format": "png",
"output_size": "full"
}'Response 200
{
"id": "rbg_x1y2z3",
"result_url": "https://cdn.xeboki.com/removebg/rbg_x1y2z3.png",
"result_base64": null,
"width": 1200,
"height": 900,
"credits_used": 1,
"expires_at": "2026-04-01T12:00:00Z"
}/v1/removebg/processRemove background — from base64
Use base64 when your image is not publicly accessible (e.g. user upload in a mobile app, server-side buffer).
Request body
| Parameter | Type | Description |
|---|---|---|
image_base64required | string | Base64-encoded image data. Max 10 MB after decoding. JPEG, PNG, and WebP supported. |
output_format | string | "png" | "webp" (default: "png"). |
output_size | string | "preview" | "full" (default: "full"). |
bg_color | string | Hex fill colour for the background. |
return_base64 | boolean | Set true to receive the result as base64 instead of a URL (max 5 MB output). |
# Read image and encode to base64
IMAGE_B64=$(base64 -i product.jpg)
curl -X POST https://api.xeboki.com/v1/removebg/process \
-H "Authorization: Bearer xbk_live_your_key_here" \
-H "Content-Type: application/json" \
-d "{
\"image_base64\": \"$IMAGE_B64\",
\"output_format\": \"png\"
}"Response 200
{
"id": "rbg_a7b8c9",
"result_url": "https://cdn.xeboki.com/removebg/rbg_a7b8c9.png",
"result_base64": null,
"width": 800,
"height": 600,
"credits_used": 1,
"expires_at": "2026-04-01T12:00:00Z"
}Batch jobs
Process multiple images in a single API call. Submit a batch, then poll for results as images complete.
/v1/removebg/batchSubmit a batch job
Submit up to 100 image URLs in one call. Returns a job ID to poll.
Request body
| Parameter | Type | Description |
|---|---|---|
imagesrequired | array | Array of image objects. Max 100 per batch. |
images[].urlrequired | string | Publicly accessible URL of the image. |
images[].id | string | Your own reference ID for this image (returned in results). |
output_format | string | "png" | "webp" applied to all images in the batch (default: "png"). |
bg_color | string | Hex fill colour applied to all images in the batch. |
curl -X POST https://api.xeboki.com/v1/removebg/batch \
-H "Authorization: Bearer xbk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"images": [
{ "url": "https://example.com/product-1.jpg", "id": "prod_001" },
{ "url": "https://example.com/product-2.jpg", "id": "prod_002" },
{ "url": "https://example.com/product-3.jpg", "id": "prod_003" }
],
"output_format": "png"
}'Response 202
{
"job_id": "batch_9f1e2d3c",
"status": "processing",
"total": 3,
"completed": 0,
"failed": 0,
"credits_reserved": 3,
"created_at": "2026-03-31T12:00:00Z"
}/v1/removebg/batch/{id}Poll batch job status
Check job progress and retrieve completed result URLs. Poll every 2–5 seconds until status is completed or failed.
result_url for 24 hours after the job completes.curl https://api.xeboki.com/v1/removebg/batch/batch_9f1e2d3c \
-H "Authorization: Bearer xbk_live_your_key_here"Response 200
{
"job_id": "batch_9f1e2d3c",
"status": "completed",
"total": 3,
"completed": 3,
"failed": 0,
"credits_used": 3,
"items": [
{
"id": "prod_001",
"status": "completed",
"result_url": "https://cdn.xeboki.com/removebg/rbg_001.png",
"width": 1200,
"height": 900,
"expires_at": "2026-04-01T12:00:00Z"
},
{
"id": "prod_002",
"status": "completed",
"result_url": "https://cdn.xeboki.com/removebg/rbg_002.png",
"width": 800,
"height": 600,
"expires_at": "2026-04-01T12:00:00Z"
},
{
"id": "prod_003",
"status": "failed",
"error": "Image could not be fetched from the provided URL."
}
]
}Quota
/v1/removebg/quotaGet quota usage
Returns your current credit balance, usage this billing period, and reset time.
curl https://api.xeboki.com/v1/removebg/quota \
-H "Authorization: Bearer xbk_live_your_key_here"Response 200
{
"plan": "Pro",
"credits_total": 10000,
"credits_used": 1247,
"credits_remaining": 8753,
"resets_at": "2026-04-30T00:00:00Z"
}Error codes
| Code | Error | Cause |
|---|---|---|
| 400 | Bad Request | Missing image_url or image_base64, or both provided at once. |
| 401 | Unauthorized | Missing or expired API key. |
| 403 | Forbidden | API key lacks the required scope. |
| 404 | Not Found | Batch job ID not found or belongs to a different account. |
| 413 | Payload Too Large | Base64 image exceeds 10 MB decoded size. |
| 422 | Unprocessable Image | Image format not supported, or image could not be fetched from the provided URL. |
| 402 | Quota Exceeded | No credits remaining. Upgrade your plan or wait for the monthly reset. |
| 429 | Too Many Requests | API rate limit exceeded. Slow down requests. |
| 500 | Internal Server Error | Contact support with your request ID. |