Usage & Quota Status
Check your API key's tier, rate limit, and monthly quota usage.
/v1/moderateGet Key Status
Returns the calling API key's tier and per-minute rate limit, plus monthly quota usage. This call doesn't count toward your monthly quota or your per-minute rate limit.
Request
curl -X GET https://api.moder8r.app/v1/moderate \
-H "Authorization: Bearer m8r_sk_your_key_here"Response
{
"api_key": {
"id": "6b1f2c9e-3a7d-4e8b-9f21-0c5d8a4e7b13",
"name": "Production Key",
"tier": "starter",
"rate_limit_per_minute": 60
},
"quota": {
"usage": 2847,
"limit": 25000,
"remaining": 22153,
"percentage": 11
},
"timestamp": "2026-10-11T14:30:45.123Z"
}Response Fields
api_key
id, nameThe key's ID and the name you gave it in the dashboard
tierPlan tier: free, starter, growth, or business
rate_limit_per_minutePer-minute request limit for this key
quota
usageRequests made by your account (all of its API keys combined) in the current calendar month (UTC)
limitYour plan's monthly request limit
remaininglimit - usage, never below 0
percentageShare of the monthly limit used, as a whole number (can exceed 100)
timestampServer time when the status was generated (ISO 8601)
Usage on Every Moderation Response
You often don't need a separate status call. Every successful POST /v1/moderate/text response includes a usage block with counts that include that request:
{
"request_id": "mod_3f2b8c1e-9a4d-4c7e-b1f0-6d2a5e8c9b13",
"flagged": false,
"categories": { ... },
"action": "allow",
"usage": {
"daily": 145,
"monthly": 2848,
"limit": 25000,
"remaining": 22152
}
}Rate-limit status is in the X-RateLimit-* response headers. See Rate Limits.
Note: GET /v1/usage is reserved and currently returns 501 Not Implemented. Use GET /v1/moderate or the usage block instead. For daily history and charts, see the dashboard.
Errors
401:missing_api_key,invalid_auth_format, orinvalid_api_key(same as every authenticated endpoint)500:{ "error": "Failed to get status" }. Note thaterroris a plain string here, not an object.
Code Examples
JavaScript/Node.js
// Node.js / JavaScript
const response = await fetch('https://api.moder8r.app/v1/moderate', {
method: 'GET',
headers: {
'Authorization': `Bearer ${process.env.MODER8R_API_KEY}`,
},
});
const status = await response.json();
if (status.quota.percentage >= 80) {
console.warn(`Warning: ${status.quota.percentage}% of monthly quota used`);
}
console.log(`Tier: ${status.api_key.tier}, ${status.api_key.rate_limit_per_minute} requests/minute`);Python
# Python
import os
import requests
response = requests.get(
'https://api.moder8r.app/v1/moderate',
headers={'Authorization': f"Bearer {os.environ['MODER8R_API_KEY']}"},
)
status = response.json()
quota = status['quota']
if quota['percentage'] >= 90:
print(f"Critical: {quota['percentage']}% of monthly limit used")
print(f"Requests remaining: {quota['remaining']}")Usage Monitoring Best Practices
Rate Limit Management
- • Watch the X-RateLimit-Remaining header
- • On 429, wait for Retry-After seconds
- • Add exponential backoff for retries
- • Queue requests during peaks
Quota Management
- • Alert at 80% of usage.limit
- • Quotas reset on the 1st of each month (UTC)
- • Handle 402 quota_exceeded gracefully
- • Upgrade before you hit the limit