Rate Limiting & Security

The API includes comprehensive security measures and validation to ensure reliable operation and protect against abuse.

Input Validation

All parameters are validated for format, size limits, and security. Invalid inputs return descriptive error messages to help with debugging.

Size Limits

  • QR code size: 50-2000 pixels (prevents resource exhaustion)
  • Data length: maximum 2953 characters (QR code standard limit)
  • Image upload: maximum 5MB (prevents excessive storage usage)

Color Format

Colors must be in hex format (#RRGGBB) to ensure consistent rendering and prevent injection attacks.

CORS Support

The API supports Cross-Origin Resource Sharing (CORS) for web applications, allowing frontend JavaScript to make direct API calls from browsers.