Credits
Every API request consumes credits from your API key's balance. The credit cost varies by endpoint and is based on database complexity, compute requirements, and response payload size.
If an API key runs out of credits, requests will be rejected with a 403 status.
Rate Limiting & Token Bucket
The ZERA Indexer API uses a Token Bucket algorithm to govern request rates. Your API key has a maximum bucket capacity (Burst) and a refill rate. When you make a request, the endpoint's strict credit cost is deducted from your bucket. If the bucket doesn't have enough credits, the request is rejected.
• CPS (Credits Per Second): The rate at which your bucket refills. For example, 10 CPS means you gain 10 credits every second. • BPS (Burst Per Second/Bucket Size): The maximum capacity of your bucket. This dictates the maximum burst of activity you can perform at once. • CPM (Credits Per Month): Your absolute monthly credit allocation ceiling.
Cost Tiers Strategy:
• Minimal (1–5) — exists, health, raw, list, network stats
• Light (10) — details, info, authorized, single pool lookup
• Standard (25–50) — balance, pools, proposals, block transactions, stats, candles, config
• Heavy (75–100) — wallet history, swap route discovery, governance details
• Expensive (250–500) — search (multi-entity parallel), graph (full snapshot)
Any endpoint not explicitly listed defaults to 10 credits per request. Use /auth/v1?request=getKeyUsageStats to monitor your usage.