Rate Limits

Understanding rate limits and quotas for the gleam.so API.

Overview

Rate limits are applied on a per-API key basis. The limits depend on your subscription plan:

Free Plan

• 100 images per month

• 5 requests per hour

• 1 concurrent request

• 5MB max file size

• Basic templates only

• Image formats (PNG, JPEG, Base64)

Pro Plan

• 1,000 images per month

• 100 requests per hour

• 5 concurrent requests

• 5MB max file size

• All templates

• Image formats (PNG, JPEG, Base64)

• Priority support

Lifetime Plan

• 2,000 images per month

• 200 requests per hour

• 10 concurrent requests

• 5MB max file size

• All templates

• Image formats (PNG, JPEG, Base64)

• Priority support

• One-time payment

Rate Types

Hourly Rate

The number of requests you can make per hour. Resets every hour.

Monthly Usage

Total number of images you can generate per month. Resets on billing date.

Concurrent Requests

Maximum number of simultaneous requests you can make at once.

Image Limits

File Size

Maximum file size is 5MB for all plans.

Dimensions

Maximum image dimension is 5000px for width and height.

Rate Limit Headers

Every API response includes headers that provide information about your current rate limit status:

X-RateLimit-Limit

The maximum number of requests you can make per minute (varies by plan).

X-RateLimit-Remaining

The number of requests remaining in the current time window.

X-RateLimit-Reset

The time at which the current rate limit window resets in UTC epoch seconds.

Rate Limit Errors

When you exceed the rate limit, the API will return a 429 Too Many Requests error:

{
  "success": false,
  "error": {
    "message": "Rate limit exceeded",
    "code": 429,
    "timestamp": "2024-01-01T00:00:00.000Z"
  }
}

Best Practices

Implement Retries

When you receive a rate limit error, wait for the duration specified in retryAfter before retrying the request.

Monitor Usage

Keep track of your usage through the rate limit headers and upgrade your plan before hitting limits.

Need higher limits? Contact us [email protected] for increased quotas and features.