Billing & Request Limits
MirApi Gateway utilizes a multi-tier billing and request limiting system to protect upstream APIs from abuse, ensure fair resource allocation, and support pay-as-you-go pricing models.
Subscription Plans
Section titled “Subscription Plans”Every user account belongs to one of three plans:
| Plan | Request Limit / Month | Overage Rate (Per Request) | Default Spend Limit |
|---|---|---|---|
free | 10,000 | Not allowed | N/A |
developer | 10,000 | $0.0001 | $10.00 |
business | 10,000 | $0.00005 | $10.00 |

Overage Cost Calculations
Section titled “Overage Cost Calculations”When a developer or business user exceeds their monthly requests limit, the gateway allows continued execution but charges an overage fee per request:
- Developer overage cost:
(used_requests - limit) * 0.0001(e.g., $1.00 per 10,000 extra requests). - Business overage cost:
(used_requests - limit) * 0.00005(e.g., $0.50 per 10,000 extra requests).
Spend Limits & Payment Required
Section titled “Spend Limits & Payment Required”To prevent runaway billing under sudden traffic spikes, paid plans feature a custom Spend Limit (billing_spend_limit).
If the calculated overage cost meets or exceeds the spend limit, the gateway immediately blocks subsequent requests and returns:
- HTTP Status:
402 Payment Required - JSON Body:
{ "error": "Payment Required", "message": "Monthly overage spend limit reached. Please increase your spend limit or upgrade your plan on the dashboard."}For the free tier, reaching 10,000 requests returns:
{ "error": "Payment Required", "message": "Monthly free tier request limit exceeded. Please upgrade your plan on the dashboard."}