Skip to content

Rate Limits

Understand usage quotas and rate limiting.

Monthly Quotas

Each plan includes a monthly image generation quota:

PlanMonthly QuotaPriceOverage
Free25 images$0/mo
Starter500 images$9/mo$0.02/ea
Pro2,000 images$19/mo$0.01/ea
Agency10,000 images$49/mo$0.01/ea
Publishing50,000 images$99/mo$0.01/ea

How Quotas Work

  • Each successful image generation counts as 1 toward your quota
  • Failed requests (4xx/5xx errors) do not count
  • Quota resets on the 1st of each month at 00:00 UTC
  • Unused quota does not roll over

Quota Exceeded

When you exceed your monthly quota:

  1. API returns 429 Too Many Requests
  2. Error code: QUOTA_EXCEEDED
  3. Images cannot be generated until quota resets

Example error response:

json
{
  "error": true,
  "message": "Monthly quota exceeded. Limit: 500 images.",
  "code": "QUOTA_EXCEEDED"
}

Monitoring Usage

Check your current usage:

bash
curl https://ogimageapi.io/api/user/usage \
  -H "X-API-Key: og_your_api_key"

Response:

json
{
  "plan": "pro",
  "quota": 500,
  "used": 425,
  "remaining": 75,
  "percent_used": 85,
  "reset_date": "2024-02-01T00:00:00.000Z"
}

Quota Alerts

We automatically send email alerts at:

UsageAlert
80%Warning email sent
95%Critical warning sent
100%Quota exceeded notification

Request Rate Limits

In addition to monthly quotas, there are per-second rate limits to ensure service stability:

PlanRequests/Second
Free1 req/s
Starter5 req/s
Pro10 req/s
Agency25 req/s
Publishing50 req/s

If you exceed the rate limit, you'll receive a 429 response. Wait briefly and retry.

Best Practices

Cache Generated Images

Don't regenerate the same image repeatedly:

javascript
// Good: Cache with a CDN or locally
const cachedImage = await cache.get(`og-${postId}`);
if (cachedImage) return cachedImage;

const image = await generateOGImage(post);
await cache.set(`og-${postId}`, image);
return image;

Generate at Build Time

For static content, generate images during build rather than on-demand:

javascript
// build-og-images.js
for (const post of posts) {
  const image = await generateOGImage(post);
  saveToPublicFolder(post.slug, image);
}

Monitor Usage Programmatically

javascript
async function checkQuota() {
  const usage = await client.getUsage();
  
  if (usage.percent_used > 90) {
    notifyAdmin('OG Image quota nearly exhausted');
  }
  
  return usage.remaining > 0;
}

Need More?

If you consistently need more than 50,000 images/month, contact us for custom enterprise pricing with volume discounts.

Generate stunning Open Graph images programmatically.