LogoRemoveBG API
PlaygroundPricingAPI DocsBlog
API Docs/Errors

API Error Codes

Standardized error responses and troubleshooting guide for the RemoveBG API. All errors follow a standard JSON format containing a code, message, and request_id.

authentication_error

401

Authentication Error

The API key provided is missing, invalid, or malformed.

How to fix:Check your 'Authorization' header. Ensure it is in the format 'Bearer rb-sk_...'. You can generate a new key in your dashboard.

permission_denied

403

Permission Denied

Your API key is valid, but you don't have permission to perform this action. This usually happens if your account is banned, not verified, or the key has been revoked.

How to fix:Check if your account is active in the dashboard. If your key was revoked, generate a new one.

payment_required

402

Insufficient Credits

You have run out of credits for the current billing period.

How to fix:Upgrade your plan or wait for the next billing cycle. You can check your remaining credits in the dashboard.

rate_limit_exceeded

429

Rate Limit Exceeded

You are sending too many requests in a short amount of time.

How to fix:Implement exponential backoff in your code. For public/free keys, the limit is lower than paid plans.

validation_error

400

Validation Error

One or more parameters in your request are invalid (e.g., wrong enum value, invalid boolean).

How to fix:Check the 'details' field in the error response for specific fields that failed validation. Refer to the API Reference.

missing_image

400

Missing Image

The request did not contain an 'image_file' field in the form-data.

How to fix:Ensure you are sending a multipart/form-data request with the file field named 'image_file'.

image_too_large

400

Image Too Large

The uploaded image exceeds the maximum allowed size (20MB).

How to fix:Compress the image or resize it before sending. Our API accepts images up to 20MB.

upstream_error

502

Upstream Processing Failed

The AI processing engine failed to handle the image. This could be a temporary glitch or an issue with the specific image.

How to fix:Retry the request with the same 'Idempotency-Key'. If it fails consistently, contact support with the X-Request-ID.

internal_server_error

500

Internal Server Error

Something went wrong on our end.

How to fix:This is not your fault. Please try again later. If the issue persists, contact support.

Still stuck?

If you're encountering a persistent 500 error or an issue not listed here, please grab the X-Request-ID from the response headers and send it to our support team.

Contact Support
Logo
RemoveBG API

The affordable, high-accuracy background removal API for developers and businesses.

Product

  • Playground
  • Pricing
  • API Docs
  • Features

Company

  • About Us
  • Blog
  • Careers
  • Changelog

Legal

  • Privacy Policy
  • Terms of Service

Connect

SupportTwitterFacebookYoutubeSlack

© 2025 RemoveBG API, Inc. All rights reserved.