Hangarx

Usage Limits

Request Processing Limits

MetricFreeProEnterprise
Requests/month1005,000Unlimited
Rate Limit10/min100/minCustom
Max File Size10 MB50 MB200 MB
Max Pages (PDF)50500Unlimited
Concurrent Sessions13Unlimited
Context Window32K100K200K tokens

Entitlement Check

// Middleware checks subscription status
function checkEntitlement(userId: string) {
  - Verify Firebase JWT
  - Fetch subscription from Firestore
  - Check usage limits against plan
  - Apply rate limiting
  - Return 402 Payment Required if exceeded
}

Cost Optimization

Sprout implements several strategies to optimize costs:

  • Token caching for repeated queries
  • Smart model routing (small model for simple tasks)
  • Aggressive file size limits on free tier
  • Usage-based Firebase reads/writes
  • Blob storage TTL auto-cleanup