SimplyPNG/Documentation

Rate Limits

Understand the rate limits and quotas that apply to your API usage

Overview

Rate limits protect the API from abuse and ensure fair usage for all developers. Limits are applied per API key and reset on a rolling window basis.

Request Limits

Maximum requests per minute based on your tier

Concurrent Jobs

Maximum simultaneous processing jobs

Payload Limits

Maximum image size and batch limits

Limits by Package Tier

Your rate limit tier is determined by your lifetime API credits purchased, not your current balance. As you purchase more credits, you automatically unlock higher rate limits.

Package TierCredits PurchasedRequests/minMax Concurrent
Trial< 500 (free trial)101
Standard500 - 24,999605
High Volume25,000+12010
EnterpriseCustom contract30025
How Tier Upgrades Work
  • Cumulative: All purchases add to your lifetime total
  • Automatic: Tier upgrades happen immediately after purchase
  • Permanent: Your tier never decreases, even if credits are used
  • Balance-independent: Current credit balance doesn't affect your tier

Example:

Buy API 500 (500 credits) → Standard tier
Buy API 25K (25,000 more) → High Volume tier (25,500 total)

Other Limits

Limit TypeValueNotes
Max image size30 MBPer image, all tiers
Max resolution4096×4096Larger images will be downscaled
Batch size50 imagesPer batch request
Output URL TTL1 hourDownload URLs expire after 1 hour

Rate Limit Headers

Every API response includes headers to help you track your rate limit status:

X-RateLimit-Limit

Maximum requests allowed in the current window

X-RateLimit-Remaining

Number of requests remaining in the current window

X-RateLimit-Reset

Unix timestamp when the rate limit window resets

Retry-After

Seconds to wait before retrying (only present on 429 responses)

Handling Rate Limits

429 Too Many Requests

When you exceed the rate limit, you'll receive a 429 response:

{
  "error": {
    "type": "rate_limit_error",
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Rate limit exceeded. Please retry after 30 seconds."
  },
  "request_id": "req_abc123"
}

Best Practices

  • 1.Implement exponential backoff: Start with a 1-second delay, then double it on each retry (1s, 2s, 4s, 8s...)
  • 2.Respect Retry-After: Always wait at least the time specified in the Retry-After header
  • 3.Monitor rate limit headers: Proactively slow down when approaching limits
  • 4.Use batch endpoints: Process multiple images in a single request when possible
  • 5.Cache results: Store processed images to avoid redundant API calls

Example: Retry with Backoff

async function callApiWithRetry(url, options, maxRetries = 3) {
  let delay = 1000; // Start with 1 second
  
  for (let attempt = 0; attempt <= maxRetries; attempt++) {
    const response = await fetch(url, options);
    
    if (response.status === 429) {
      const retryAfter = response.headers.get('Retry-After');
      const waitTime = retryAfter 
        ? parseInt(retryAfter) * 1000 
        : delay;
      
      console.log(`Rate limited. Waiting ${waitTime}ms...`);
      await new Promise(r => setTimeout(r, waitTime));
      delay *= 2; // Exponential backoff
      continue;
    }
    
    return response;
  }
  
  throw new Error('Max retries exceeded');
}
Need Higher Limits?
Upgrade to Pro for 6x more requests per minute, or contact us for Enterprise pricing.