Understanding API Calls and Image Generation Credits

The difference between API calls and image generation credits, how each is counted, and how to manage your usage.

Available on: Pro, Growth, and Max plans

Overview

SnapGlyph’s API uses two types of usage limits:

  1. API Calls: counted for every request to the API
  2. Image Generation Credits: counted when the API generates and returns a QR code image

Knowing how each one is counted helps you optimize your integration and pick the right plan.

API Call Limits

Every request to the SnapGlyph API counts as one API call, regardless of the operation type.

Plan Monthly API Calls
Pro 1,000
Growth 2,000
Max 10,000

What Counts as an API Call

  • Creating a QR code
  • Updating a QR code
  • Deleting a QR code
  • Listing your QR codes
  • Retrieving QR code data (JSON)
  • Retrieving QR code images (also uses image generation credits)
  • Creating, updating, listing, or deleting short URLs
  • Fetching click analytics for short URLs
  • Any other API endpoint request

Example

A month with:

  • 50 QR code creation requests
  • 100 list requests
  • 200 get requests (JSON only)
  • 50 image generation requests
  • 30 short URL operations

Total API calls used: 430

Image Generation Credits

Image generation credits are consumed when the API renders and returns an actual QR code image file. This is separate from (and in addition to) the standard API call.

Plan Monthly Image Credits
Pro 200
Growth 400
Max 2,000

Credit Costs by Format

Format Credits Used Notes
SVG 1 credit Vector format, no logo support
PNG 10 credits Raster format, required for logos

Why PNG Costs More

PNG generation requires more server resources because:

  • Raster rendering at specified resolution
  • Logo compositing and positioning
  • Image compression and optimization
  • Higher memory usage for large sizes

SVG files are generated mathematically and don’t require the same rendering pipeline.

When Credits Are Used

Image generation credits are only consumed when you request an image format. URL Shortener operations never consume image credits. They only count as API calls.

# Uses 1 API call + 1 image credit (SVG)
GET /api/v1/qr-codes/qr_abc123?format=svg

# Uses 1 API call + 10 image credits (PNG)
GET /api/v1/qr-codes/qr_abc123?format=png

# Uses 1 API call only (no image credits)
GET /api/v1/qr-codes/qr_abc123
GET /api/v1/qr-codes/qr_abc123?format=json

Combined Usage Example

A typical integration might use both limits like this:

Operation API Calls Image Credits
Create 100 QR codes 100 0
List QR codes (10 pages) 10 0
Get 50 QR codes as JSON 50 0
Download 30 SVG images 30 30
Download 20 PNG images 20 200
Total 210 230

Optimizing Your Usage

Reduce API Calls

  • Cache responses: Store QR code data locally instead of fetching repeatedly
  • Use pagination efficiently: Request larger page sizes (up to 100) to reduce list calls
  • Batch where possible: Use bulk create endpoints instead of individual calls (Max plan)

Reduce Image Credits

  • Use SVG when possible: If you don’t need a logo, SVG uses 10x fewer credits than PNG
  • Cache images: Download once and store locally rather than fetching repeatedly
  • Generate on-demand: Only request images when actually needed

When to Use Each Format

Use Case Recommended Format Credits
Web display (no logo) SVG 1
Print materials (no logo) SVG 1
QR codes with logos PNG 10
Social media sharing PNG 10
Email attachments PNG 10

Checking Your Usage

Monitor your usage in the SnapGlyph app:

  1. Go to Settings > API
  2. View your current month’s usage:
    • API calls used / limit
    • Image credits used / limit
  3. Usage resets at the start of each billing cycle

Rate Limit Headers

API responses include headers showing your remaining limits:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 790
X-RateLimit-Reset: 1704067200
X-ImageCredits-Limit: 200
X-ImageCredits-Remaining: 170

What Happens at the Limit

API Call Limit Reached

When you hit your API call limit:

  • Requests return 429 Too Many Requests
  • The response includes when the limit resets
  • Wait for reset or upgrade your plan

Image Credit Limit Reached

When you hit your image generation limit:

  • Image requests return 429 Too Many Requests
  • JSON/data requests continue to work (if API calls remain)
  • Wait for reset or upgrade your plan

Choosing the Right Plan

If you need… Recommended Plan
Up to 1,000 API calls/month Pro
Up to 200 image generations/month Pro
Up to 2,000 API calls/month Growth
Up to 400 image generations/month Growth
Heavy API usage (up to 10,000 calls) Max
High-volume image generation (up to 2,000) Max
Bulk QR code creation Max

Frequently Asked Questions

Do failed requests count against my limits?

No. Only successful requests (2xx status codes) count against your API call and image generation limits.

Can I buy additional credits?

Currently, limits are plan-based. If you need higher limits, upgrade to the Max plan. For enterprise needs beyond Max limits, contact us.

Do credits roll over?

No. Unused API calls and image generation credits do not roll over to the next month. Limits reset at the start of each billing cycle.

Does the web app use my API limits?

No. Using SnapGlyph through the web app or browser extension does not count against your API limits. Only programmatic API requests using your API key are counted.

Next Steps