BrainUs LogoBrainUs AI
Usage API

Quota Management

Monitor and manage your API quotas effectively

Monitor your API quotas and understand your plan's limits to optimize usage and avoid service interruptions.

Understanding Quotas

Your API plan includes multiple rate limits that work together:

Limit TypeDescriptionReset Schedule
Per-minute limitMaximum requests per minuteEvery 60 seconds
Daily limitMaximum requests per 24-hour periodMidnight UTC each day
Monthly quotaTotal requests for the billing month1st of month, 00:00 UTC

All limits must be satisfied for a request to succeed.

Plan Limits

PlanPer MinutePer DayMonthly Quota
Free10300300
Starter2010,00010,000
Pro6050,00050,000
Enterprise2001,000,0001,000,000

Check Quota Status

Get your current quota usage programmatically:

Python

from brainus_ai import BrainusAI

async def check_quota():
    client = BrainusAI(api_key="your_api_key_here")
    usage = await client.get_usage()

    print(f"Plan: {usage.plan.name}")
    print(f"Quota used: {usage.quota_percentage:.1f}%")
    print(f"Remaining: {usage.quota_remaining:,} requests")

JavaScript

import { BrainusAI } from "@brainus/ai";

const client = new BrainusAI({ apiKey: "your_api_key_here" });
const usage = await client.getUsage();

console.log(`Plan: ${usage.plan.name}`);
console.log(`Quota used: ${usage.quotaPercentage.toFixed(1)}%`);
console.log(`Remaining: ${usage.quotaRemaining.toLocaleString()} requests`);

Monitor Usage in Dashboard

For visual monitoring and detailed analytics, visit the Developer Dashboard where you can:

  • View real-time quota usage with visual charts
  • Track historical usage trends
  • Set up quota alerts and notifications
  • Analyze usage by endpoint and time period
  • Monitor cost and token consumption
  • Export usage data for reporting

The Developer Dashboard provides comprehensive usage analytics and monitoring tools. Log in at developers.brainus.lk to access your usage dashboard.

Quota Warnings

Watch for these response headers to monitor quota status:

X-RateLimit-Remaining: 45
X-RateLimit-Limit: 60
X-RateLimit-Reset: 1640000000

When you approach or exceed limits, you'll receive appropriate error responses:

  • 429 Too Many Requests - Rate limit exceeded
  • 403 Forbidden - Monthly quota exceeded

Best Practices

  1. Monitor regularly - Check quota status in the dashboard daily
  2. Set up alerts - Configure notifications at 80% and 90% usage
  3. Plan ahead - Upgrade before reaching limits during high-traffic periods
  4. Optimize usage - Use caching and batch requests when possible
  5. Track trends - Review historical data to predict future needs

Upgrade Your Plan

If you're approaching your quota limits, consider upgrading your plan:

  • Starter - For growing projects (10K/month)
  • Pro - For production applications (50K/month)
  • Enterprise - For large-scale deployments (1M/month)

Contact our sales team to discuss custom quotas for enterprise needs.

On this page