Check Quota
View your usage and remaining credits
Check Quota
/v1/quotaCheck your current usage and remaining credits for the billing period. Use this endpoint to monitor your quota before creating audits.
Response
planstringenum: free | pro | agency | enterpriseYour current subscription tier.
credits_totalnumberTotal credits available in your plan for the current period.
credits_usednumberCredits consumed so far in the current period.
credits_remainingnumberCredits remaining (credits_total - credits_used).
reset_datestringISO 8601 timestamp when your quota resets (midnight UTC).
Example Response
{
"plan": "pro",
"credits_total": 1000,
"credits_used": 47,
"credits_remaining": 953,
"reset_date": "2024-01-16T00:00:00.000Z"
}Tier Limits
| Tier | Daily Limit | Reset Time |
|---|---|---|
| Free | 3 | Midnight UTC |
| Pro | 1,000 | Midnight UTC |
| Agency | 5,000 | Midnight UTC |
| Enterprise | Unlimited | - |
Enterprise customers have no hard limits. Contact support if you need higher throughput.
HTTP Status Codes
| Status | Description |
|---|---|
200 OK | Quota information retrieved successfully. |
401 Unauthorized | Missing or invalid API key. |
Code Examples
import 'dotenv/config';
interface QuotaResponse {
plan: 'free' | 'pro' | 'agency' | 'enterprise';
credits_total: number;
credits_used: number;
credits_remaining: number;
reset_date: string;
}
async function getQuota(): Promise<QuotaResponse> {
const response = await fetch('https://vertaaux.ai/api/v1/quota', {
headers: {
'X-API-Key': process.env.VERTAAUX_API_KEY!,
},
});
if (!response.ok) {
const error = await response.json();
throw new Error(`Failed to get quota: ${error.message}`);
}
return response.json();
}
// Usage
const quota = await getQuota();
console.log(`Plan: ${quota.plan}`);
console.log(`Remaining: ${quota.credits_remaining}/${quota.credits_total}`);
// Output:
// Plan: pro
// Remaining: 953/1000curl https://vertaaux.ai/api/v1/quota \
-H "X-API-Key: $VERTAAUX_API_KEY"Response:
{
"plan": "pro",
"credits_total": 1000,
"credits_used": 47,
"credits_remaining": 953,
"reset_date": "2024-01-16T00:00:00.000Z"
}import os
import requests
from typing import TypedDict, Literal
class QuotaResponse(TypedDict):
plan: Literal['free', 'pro', 'agency', 'enterprise']
credits_total: int
credits_used: int
credits_remaining: int
reset_date: str
def get_quota() -> QuotaResponse:
"""Get current quota usage."""
response = requests.get(
'https://vertaaux.ai/api/v1/quota',
headers={'X-API-Key': os.environ['VERTAAUX_API_KEY']}
)
if not response.ok:
error = response.json()
raise Exception(f"Failed to get quota: {error.get('message')}")
return response.json()
# Usage
quota = get_quota()
print(f"Plan: {quota['plan']}")
print(f"Remaining: {quota['credits_remaining']}/{quota['credits_total']}")
# Output:
# Plan: pro
# Remaining: 953/1000Check Before Creating Audit
Best practice is to verify quota before creating an audit:
async function createAuditSafely(url: string) {
// Check quota first
const quota = await getQuota();
if (quota.credits_remaining === 0) {
const resetTime = new Date(quota.reset_date).toLocaleString();
throw new Error(`Quota exhausted. Resets at ${resetTime}`);
}
// Proceed with audit
return createAudit(url);
}Rate Limit Headers
The quota endpoint also returns rate limit headers:
| Header | Description |
|---|---|
X-RateLimit-Limit | Your daily quota limit |
X-RateLimit-Remaining | Remaining credits |
X-RateLimit-Reset | Unix timestamp when quota resets |
curl -i https://vertaaux.ai/api/v1/quota \
-H "X-API-Key: $VERTAAUX_API_KEY"
# Response headers:
# X-RateLimit-Limit: 1000
# X-RateLimit-Remaining: 953
# X-RateLimit-Reset: 1705363200Caching
Quota responses are cached for 60 seconds to reduce database load. For real-time accuracy, use the rate limit headers from the Create Audit response.
Also Available
Related
Create Audit
Start a new audit using your quota
Quota Errors
Handle quota exceeded errors
Upgrade Plan
Increase your quota limits
Was this page helpful?