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
401Authentication Error
The API key provided is missing, invalid, or malformed.
permission_denied
403Permission 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.
payment_required
402Insufficient Credits
You have run out of credits for the current billing period.
rate_limit_exceeded
429Rate Limit Exceeded
You are sending too many requests in a short amount of time.
validation_error
400Validation Error
One or more parameters in your request are invalid (e.g., wrong enum value, invalid boolean).
missing_image
400Missing Image
The request did not contain an 'image_file' field in the form-data.
image_too_large
400Image Too Large
The uploaded image exceeds the maximum allowed size (20MB).
upstream_error
502Upstream Processing Failed
The AI processing engine failed to handle the image. This could be a temporary glitch or an issue with the specific image.
internal_server_error
500Internal Server Error
Something went wrong on our end.
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.