QANATIX
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 bills on two metrics: Records (active records stored) and Searches (search API calls per month).

FreePro (€199/mo)Scale (€399/mo)Enterprise
Collections15UnlimitedUnlimited
Records50100,000UnlimitedUnlimited
Searches5050,000500,000Unlimited
Search overageBlocked€1.50/1K€1/1KCustom

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,
    "records": 342
  }
}
FieldDescription
requestsTotal API calls
searchesSearch queries executed
recordsActive records (records) stored

How usage is tracked

  1. Every API request increments a Redis counter (atomic, ~0.1ms overhead)
  2. Counters are flushed to Postgres every 5 minutes via Taskiq scheduled task
  3. The portal usage endpoint combines Redis (real-time) + Postgres (persisted) for accurate totals
  4. Free plan: hard block at limits (HTTP 402)
  5. Paid plans: unlimited usage, metered for end-of-month billing

Rate limits

Rate limits are per-tenant, enforced via Redis token bucket:

PlanAPI calls/minSearch/min
Free6020
Pro600300
Scale2,0001,000
Enterprise10,00010,000

Exceeding rate limits returns HTTP 429 with X-RateLimit-Remaining and X-RateLimit-Reset headers.

On this page