Errors & Limits – ByByBG Documentation
❌ Errors & Limits

API Errors & Limits

Understand API status codes, upload restrictions, request limits, and troubleshooting solutions for production applications.

OVERVIEW

Understanding API Responses

The ByByBG API returns standard HTTP status codes to indicate successful requests, failures, upload restrictions, and rate limits.

Tip: Always handle API errors properly in production applications for better stability and user experience.
STATUS CODES

Common HTTP Status Codes

Code
Description
200
Background removed successfully.
400
Invalid request or missing image file.
401
Missing or invalid API key.
403
Access denied.
413
Uploaded image file is too large.
415
Unsupported image format.
429
Too many requests. Rate limit exceeded.
500
Internal server processing error.
503
Service temporarily unavailable.
LIMITS

Upload Restrictions

  • Maximum supported image size: 10MB.
  • Supported formats: PNG, JPG, JPEG, and WEBP.
  • Transparent output format: PNG.
  • API requests may be rate limited.
  • Large uploads may increase processing time.
TROUBLESHOOTING

Common Problems & Solutions

🔐

Invalid API Key

Verify your API key and request headers before sending requests.

📦

Large Image

Compress images before uploading to reduce file size and improve speed.

🌐

Network Error

Check internet connection and backend server availability.

Rate Limit

Reduce request frequency or upgrade your API plan.

BEST PRACTICES

Production Recommendations

  • Use retry mechanisms for failed requests.
  • Display user-friendly error messages.
  • Validate uploads before sending files.
  • Compress large images before upload.
  • Cache successful responses when possible.
  • Monitor API usage and request limits.
ERROR RESPONSE

Example JSON Error Response

{
  "success": false,
  "error": "Invalid API key"
}

Documentation Complete

You are now ready to integrate the ByByBG API into websites, mobile apps, SaaS platforms, and automation systems.