Skip to content

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.


Every user account belongs to one of three plans:

PlanRequest Limit / MonthOverage Rate (Per Request)Default Spend Limit
free10,000Not allowedN/A
developer10,000$0.0001$10.00
business10,000$0.00005$10.00

Billing Dashboard Screenshot

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).

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."
}