API Reference
Usage API
Query usage statistics and estimated costs for your tenant.
Usage API
Track API usage and costs per tenant. Usage is metered in real-time and costs are calculated based on your plan's per-unit rates.
Pricing model
Qanatix uses tiered pricing with generous included quotas and per-use overage billing.
| Free | Pro ($199/mo) | Scale ($399/mo) | Enterprise | |
|---|---|---|---|---|
| Verticals | 1 | 5 | Unlimited | Unlimited |
| Ingestions | 500 | 10,000 | 100,000 | Unlimited |
| Ingestion overage | Blocked | $6/1K | $4/1K | Custom |
| Entities | 1,000 | 100,000 | Unlimited | Unlimited |
| Searches | 1,000 | 50,000 | 500,000 | Unlimited |
| Search overage | Blocked | $1.50/1K | $1/1K | Custom |
Free plan has hard caps — requests are blocked (HTTP 402) when limits are reached. Paid plans allow overages, billed end-of-month.
GET /usage
Get usage stats for the current month.
curl "https://api.qanatix.com/api/v1/usage" \
-H "Authorization: Bearer sk_live_abc123..."Response (200)
{
"tenant_id": "your-tenant-id",
"usage": {
"requests": 1678,
"searches": 1247,
"ingested_records": 89,
"entities_created": 342
}
}| Field | Description |
|---|---|
requests | Total API calls |
searches | Search queries executed |
ingested_records | Records ingested (across all batches) |
entities_created | Entities created via CRUD API |
How usage is tracked
- Every API request increments a Redis counter (atomic, ~0.1ms overhead)
- Counters are flushed to Postgres every 5 minutes via SAQ cron job
- The portal usage endpoint combines Redis (real-time) + Postgres (persisted) for accurate totals
- Free plan: hard block at limits (HTTP 402)
- Paid plans: unlimited usage, metered for end-of-month billing
Rate limits
Rate limits are per-tenant, enforced via Redis token bucket:
| Plan | API calls/min | Search/min |
|---|---|---|
| Free | 60 | 20 |
| Pro | 600 | 300 |
| Scale | 2,000 | 1,000 |
| Enterprise | 10,000 | 5,000 |
Exceeding rate limits returns HTTP 429 with X-RateLimit-Remaining and X-RateLimit-Reset headers.