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.

Credits: Each processed image consumes 1 credit. Batch jobs consume 1 credit per image in the job. Check your remaining quota with 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_here

Required scopes

removebg:images:processProcess images (single and batch)
removebg:quota:readCheck credit usage and remaining quota
removebg:batch:writeSubmit batch processing jobs
removebg:batch:readPoll batch job status and retrieve results

Process image

Remove the background from a single image. Submit by public URL or base64-encoded data.

POST/v1/removebg/process

Remove background — from URL

The quickest way to process publicly accessible images. Pass the image URL and receive a result URL back.

Request body

ParameterTypeDescription
image_urlrequiredstringPublicly accessible URL of the image to process (JPEG, PNG, WebP).
output_formatstring"png" | "webp" — output format (default: "png"). PNG preserves transparency.
output_sizestring"preview" (max 0.25MP, fast) | "full" (original resolution, default).
bg_colorstringHex 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"
}
result_url expiry: Result files are available for 24 hours. Download and store them in your own storage immediately after processing.
POST/v1/removebg/process

Remove 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

ParameterTypeDescription
image_base64requiredstringBase64-encoded image data. Max 10 MB after decoding. JPEG, PNG, and WebP supported.
output_formatstring"png" | "webp" (default: "png").
output_sizestring"preview" | "full" (default: "full").
bg_colorstringHex fill colour for the background.
return_base64booleanSet 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.

Batch vs single: Use batch when processing 5+ images. Batches are processed in parallel — a 100-image batch typically completes in under 60 seconds. Each image still consumes 1 credit.
POST/v1/removebg/batch

Submit a batch job

Submit up to 100 image URLs in one call. Returns a job ID to poll.

Request body

ParameterTypeDescription
imagesrequiredarrayArray of image objects. Max 100 per batch.
images[].urlrequiredstringPublicly accessible URL of the image.
images[].idstringYour own reference ID for this image (returned in results).
output_formatstring"png" | "webp" applied to all images in the batch (default: "png").
bg_colorstringHex 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"
}
GET/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.

Poll at a maximum of once per 2 seconds. Results are available at their 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

GET/v1/removebg/quota

Get 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

CodeErrorCause
400Bad RequestMissing image_url or image_base64, or both provided at once.
401UnauthorizedMissing or expired API key.
403ForbiddenAPI key lacks the required scope.
404Not FoundBatch job ID not found or belongs to a different account.
413Payload Too LargeBase64 image exceeds 10 MB decoded size.
422Unprocessable ImageImage format not supported, or image could not be fetched from the provided URL.
402Quota ExceededNo credits remaining. Upgrade your plan or wait for the monthly reset.
429Too Many RequestsAPI rate limit exceeded. Slow down requests.
500Internal Server ErrorContact support with your request ID.