Understanding API Calls and Image Generation Credits

Learn the difference between API calls and image generation credits, how each is counted, and how to optimize your usage.

Available on: Pro 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

Understanding how these work helps you optimize your integration and choose the right plan.

API Call Limits

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

PlanMonthly API Calls
Pro1,000
Max10,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)
  • Any other API endpoint request

Example

If you make these requests in a month:

  • 50 create requests
  • 100 list requests
  • 200 get requests (JSON only)
  • 50 image generation requests

Total API calls used: 400

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.

PlanMonthly Image Credits
Pro200
Max2,000

Credit Costs by Format

FormatCredits UsedNotes
SVG1 creditVector format, no logo support
PNG10 creditsRaster 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:

# 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

Here’s how a typical integration might use both limits:

OperationAPI CallsImage Credits
Create 100 QR codes1000
List QR codes (10 pages)100
Get 50 QR codes as JSON500
Download 30 SVG images3030
Download 20 PNG images20200
Total210230

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 CaseRecommended FormatCredits
Web display (no logo)SVG1
Print materials (no logo)SVG1
QR codes with logosPNG10
Social media sharingPNG10
Email attachmentsPNG10

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/monthPro
Up to 200 image generations/monthPro
Heavy API usage (up to 10,000 calls)Max
High-volume image generation (up to 2,000)Max
Bulk QR code creationMax

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