Billing & Usage
Understand Hebbrix pricing tiers, monitor your API usage, and manage your subscription programmatically.
Plan entitlements
Current plan entitlements
Loaded from the same public plan catalog used by Dashboard Billing. Contract-specific Enterprise terms are separate. Graph reads can be available on lower tiers; manual graph mutation and inference have additional gates described in the graph guide.
Unlimited allowances. An Enterprise account's operation-credit allowance is unlimited, and every response that reports a balance says so the same way. Responses carry X-Credits-Unlimited: true and no X-Credits-Remaining, X-Credits-Total or X-Credits-Usage-Percent header. The billing receipt on /v1/search/reason and /v1/chat/completions reports unlimited: true with quota_remaining: -1 and operation_credits_remaining: -1. GET /v1/usage/quota reports credits.is_unlimited: true (with credits.remaining and credits.total at -1), and GET /v1/usage/credits reports unlimited: true. Branch on the boolean, never on the number: quota_remaining is also -1 with unlimited: false when no credit charge was recorded for the request. Unlimited credits do not lift rate limits.
Credit weights and a worked example
The generated OpenAPI contract publishes each operation's x-hebbrix-default-credit-weight. Defaults: read operations 0; raw memory 1; smart ingestion 5; hybrid search 2; reasoning search 10; documents 10 per MB. These are operation weights, not a universal one-credit-per-request promise.
Bring your own key (Starter and above). When your account has a validated Anthropic or OpenAI key, every model call Hebbrix makes for your account runs on that key and your provider bills it. Operations then charge only their platform credits: chat 1 credit for any model, reasoning search 2, smart ingestion and /v1/memories/process 1; all other weights are unchanged. Responses report this in X-Credits-BYOK-Waived and X-Hebbrix-LLM-Key-Source. If your provider rejects the key, your provider account is out of credit or it rate-limits the key, the request fails with 424 byok_provider_key_rejected, 424 byok_provider_quota_exhausted, 429 byok_provider_rate_limited or 503 byok_provider_unavailable; its credits are refunded and Hebbrix does not retry with a platform key. Google keys are stored and validated but not used for routing. Embeddings and reranking run on Hebbrix infrastructure.
| Operation | Default credits | Unit |
|---|---|---|
| Read-only resource retrieval | 0 | Request |
| Raw memory write | 1 | Request |
| Smart ingestion | 5 | Request |
| Hybrid search | 2 | Request |
| Reasoning search | 10 | Request |
| Document ingestion | 10 | MB |
Example using those defaults: 100 raw writes × 1 + 50 hybrid searches × 2 + 10 smart-ingestion requests × 5 = 250 operation credits. Managed-model usage, size-based operations, and account-specific billing configuration can add or change charges. Check the served-model usage receipt, current credit balance and billing ledger for actual amounts; the example is not a price guarantee.
Pricing Tiers
| Tier | Price | Includes |
|---|---|---|
| Free | $0/month | For side projects and experimentation. 1K credits/month, GPT-5-nano model, Hybrid search, Outcome Memory, Community support. |
| Starter | $19/month | For indie developers. 25K credits/month, GPT-5-mini model, Hybrid search, BYOK support, Knowledge graph. |
| ProMost Popular | $99/month | For teams and production apps. 200K credits/month, GPT-5 model, 99.9% availability objective, Advanced analytics. |
| Scale | $399/month | For teams with heavy workloads. 1M credits/month, Managed model / BYOK, Knowledge graph, Team collaboration, Custom integrations. |
| Enterprise | Custom | For large organizations. Pay as you go, Your own model key (BYOK), Dedicated infrastructure, Security questionnaire and procurement review, Custom terms by signed agreement. |
Usage Limits
| Resource | Free | Starter | Pro | Scale | Enterprise |
|---|---|---|---|---|---|
| Price | $0/mo | $19/mo | $99/mo | $399/mo | By signed agreement |
| Credits | 1K/mo | 25K/mo | 200K/mo | 1M/mo | Pay as you go |
| Account request limit (all endpoints) | 300/min | 1,200/min | 6,000/min | 30,000/min | 60,000/min |
| Endpoint limit for search, chat, processing and listing collections | 60/min | 300/min | 1,200/min | 2,000/min | 3,000/min |
| Default Model | GPT-5-nano | GPT-5-mini | GPT-5 | Managed model / BYOK | Any configured model |
| Knowledge Graph | - | ✓ | ✓ | ✓ | ✓ |
| BYOK | - | ✓ | ✓ | ✓ | ✓ |
| Outcome Memory (policies, decisions, outcomes, advice) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Outcome Memory batch routes | - | ✓ | ✓ | ✓ | ✓ |
Legacy RL agent metrics and evaluation (/v1/rl; not Outcome Memory) | - | - | ✓ | ✓ | ✓ |
| SLA | - | - | Plan terms | Best-effort objective | Custom |
| Support | Community | Standard | Priority | Priority | 24/7 Dedicated |
Endpoints
High-level usage overview: summary, per-API-key breakdown, top endpoints, daily chart, and the PDF-contract `api_calls: {used, limit, remaining, percentage}` at the top level. Use this for dashboards. For strict per-quota values use `/v1/usage/quota` instead.
Response
| Field | Type | Description |
|---|---|---|
summary | object | Aggregated counts over the selected window: total_requests, successful_requests, failed_requests, success_rate, total_bytes_sent, total_bytes_received, avg_latency_ms, period_start, period_end |
api_keys | array | Per-API-key breakdown |
top_endpoints | array | Highest-traffic endpoints in the window |
daily_usage | array | Per-day totals for the window |
api_calls | object | PDF-contract convenience: {used, limit, remaining, percentage}. `limit=-1` means unlimited. |
Example
{
"summary": {
"total_requests": 45230,
"successful_requests": 45100,
"failed_requests": 130,
"success_rate": 99.71,
"avg_latency_ms": 57.3
},
"api_keys": [],
"top_endpoints": [
{
"endpoint": "/v1/search",
"method": "POST",
"request_count": 12000
}
],
"daily_usage": [
{
"date": "2024-01-15",
"total_requests": 1500
}
],
"api_calls": {
"used": 45230,
"limit": 100000,
"remaining": 54770,
"percentage": 45.23
}
}Per-quota breakdown for the current billing period: memories, api_calls, tokens, searches, chat_completions, and credits (when credit billing is enabled). Use this when you need to render progress bars or gate actions on remaining quota.
Response
| Field | Type | Description |
|---|---|---|
tier | string | Current subscription tier (free/starter/pro/scale/enterprise) |
memories | object | {used, limit, remaining, percentage}. limit=-1 means unlimited |
api_calls | object | {used, limit, remaining, percentage} |
tokens | object | {used, limit, remaining, percentage}. Legacy field; billing is credit-based, kept for backwards compatibility only. |
searches | object | {count} for the current month |
chat_completions | object | {count} for the current month |
period_start | datetime | First day of current month |
period_end | datetime | Last day of current month |
credits | object? | Credit usage (present when credit billing is enabled) |
Paginated history of individual API requests made by this account.
Request body
| Field | Type | Description |
|---|---|---|
limit | integer (query param) | Page size (default: 50, max: 500) |
offset | integer (query param) | Pagination offset (default: 0) |
days | integer (query param) | Filter to the last N days. Must be ≥ 1; `days=0` is rejected with HTTP 422. Omit for all-time history. |
api_key_id | string (query param) | Filter to requests made with this API key |
endpoint | string (query param) | Substring match on request path (e.g. "/search") |
status_code | integer (query param) | Filter by HTTP response code |
Get current subscription details including tier and payment info.
Response
| Field | Type | Description |
|---|---|---|
tier | string | Current subscription tier |
status | string | Subscription status (active, past_due, cancelled) |
current_period_end | datetime | When current period ends |
cancel_at_period_end | boolean | Whether subscription will cancel |
payment_method | object | Payment method details |
Upgrade to a higher tier. Requires an active Stripe subscription (complete checkout from the Dashboard first), otherwise returns 404 `no_active_subscription`. Pro-rated billing applies immediately. Send the destination tier as `tier` (preferred) or the legacy `plan` field.
Request body
| Field | Type | Description |
|---|---|---|
tierrequired | string | Target tier: `free`, `starter`, `pro`, `scale`, or `enterprise`. Preferred field. |
plan | string | Legacy alias of `tier`, still accepted for backward compatibility. |
billing_interval | string | Optional: `monthly` or `yearly` |
prorate | boolean | Whether to prorate charges (default true) |
Downgrade to a lower tier. Requires an active Stripe subscription, otherwise returns 404 `no_active_subscription`. Takes effect at end of the current billing period. Send the destination tier as `tier` (preferred) or the legacy `plan` field.
Request body
| Field | Type | Description |
|---|---|---|
tierrequired | string | Target tier: `free`, `starter`, `pro`, or `scale`. Preferred field. |
plan | string | Legacy alias of `tier`, still accepted. |
billing_interval | string | Optional: `monthly` or `yearly` |
prorate | boolean | Whether to prorate charges (default true) |
List all invoices for your account.
Response
| Field | Type | Description |
|---|---|---|
[] | Invoice[] | JSON array. Each element has the fields below. |
[].id | string | Invoice id |
[].status | string | Stripe invoice status: draft | open | paid | uncollectible | void |
[].currency | string | ISO currency code, e.g. "usd" |
[].total | number | Invoice total (in major units, not cents) |
[].amount_paid | number | Amount already paid |
[].amount_due | number | Amount still due |
[].period_start | datetime? | Billing period start |
[].period_end | datetime? | Billing period end |
[].paid_at | datetime? | When the invoice was paid |
[].hosted_invoice_url | string? | Stripe-hosted invoice page |
[].invoice_pdf_url | string? | Direct PDF download URL |
[].created_at | datetime | When the invoice was created |
Code Examples
Check Usage
import os
import requests
BASE = "https://api.hebbrix.com/v1"
H = {"Authorization": f"Bearer {os.environ['HEBBRIX_API_KEY']}"}
# GET /v1/usage: dashboard-style overview with PDF-contract api_calls
# object exposed at the top level.
r = requests.get(f"{BASE}/usage", headers=H)
usage = r.json()
ac = usage["api_calls"]
print(f"API Calls: {ac['used']}/{ac['limit']}") # limit = -1 for unlimited tiers
print(f"Remaining: {ac['remaining']}")
print(f"Percentage: {ac['percentage']:.1f}%")
# Summary block has success_rate, total_bytes_*, avg_latency_ms, etc.
print(f"Avg latency: {usage['summary']['avg_latency_ms']} ms")Monitor Usage Programmatically
# Warn when nearing the quota. Handle "unlimited" (limit=-1) safely.
r = requests.get(f"{BASE}/usage", headers=H)
ac = r.json()["api_calls"]
if ac["limit"] > 0:
percent_used = (ac["used"] / ac["limit"]) * 100
if percent_used > 80:
print(f"Warning: {percent_used:.1f}% of API calls used this period")
if percent_used > 95:
print("Critical: upgrade or wait for the quota reset")
else:
print("Unlimited tier, no quota pressure")Upgrade Subscription
# POST /v1/billing/upgrade: body accepts `tier` (preferred) or the
# legacy `plan` key. Both resolve to the same internal field.
r = requests.post(
f"{BASE}/billing/upgrade",
headers=H,
json={"tier": "pro", "billing_interval": "monthly"},
)
new_sub = r.json()
# GET /v1/billing/subscription: current plan + renewal date
r = requests.get(f"{BASE}/billing/subscription", headers=H)
sub = r.json()
print(f"Status: {sub['status']}")
print(f"Renews: {sub['current_period_end']}")Rate limits and headers
Every authenticated response reports the account request limit in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. A rate-limited request returns HTTP 429 with X-RateLimit-Scope (account, endpoint, ip or ip_api_key) and Retry-After. Endpoint limits, per-IP edge limits and error envelopes are documented together in Errors and rate limits; the plan table above lists the same numbers.
Read quota and UTC period boundaries from GET /v1/usage/quota. Usage overview windows are rolling intervals, not lifetime API-key counters. API-key metadata and traffic from removed keys are different concepts.
Overage & Limits
402 with error.type: credits_exhausted until the next billing period. Operations that cost no credits keep working: reads (GET), updates (PATCH, PUT), deletes, and Outcome Memory decisions and outcomes. Rate limits are a separate control and return 429.- Overage billing. On Starter, Pro and Scale you can turn on overage with
PATCH /v1/billing/overage(overage_enabled,overage_cap_usd) or in Dashboard Billing. Operations then continue past the plan's credits at $0.002 per credit until the monthly spend cap you set (default $50, at most $1,000); at the cap they return402again.GET /v1/billing/overageshows the current setting. Free accounts cannot enable overage, and Enterprise accounts have an unlimited allowance.
- Period boundaries. Subscription credits follow the period returned by the billing API. The legacy API-call quota is measured by UTC calendar month; the Usage page is a separately selected rolling reporting window. Use the returned start/end timestamps rather than assuming these periods are identical.
- Instant Upgrades. Upgrades take effect immediately with pro-rated billing. New limits apply right away.
Billing response fields
Metered operations return a set of billing fields so you can show cost and remaining quota to your users. The table below documents the meaning and stability of each one.
| Field | Type | Meaning |
|---|---|---|
quota_remaining | int | Credits left in the current period. A non-negative number is the literal remaining count. -1 when unlimited is true, and also when no credit charge was recorded for the request (unlimited is then false). Branch on unlimited, never on the number, and special-case -1 before doing arithmetic. |
unlimited | bool | true when the account's operation-credit allowance is unlimited. quota_remaining and operation_credits_remaining are then -1. Unlimited credits do not lift rate limits. |
operation_credits_charged | int | Operation credits Hebbrix charged the account for the request, also reported in the X-Credits-Charged header. Under operation-credit billing this is the charge. |
stages | array | One entry per stage the request ran, with its stage name and kind: model entries carry the provider tokens that stage spent; a deterministic entry (for example an answer taken from a verified span) spent none. |
provider_tokens | object | prompt_tokens, completion_tokens and total_tokens summed over the model entries of stages: what the model providers metered for this request. |
actual_tokens | int | Provider tokens of every model stage the request ran, not only the call that wrote the answer. Equal to provider_tokens.total_tokens, the sum over stages. |
billed_tokens | int | actual_tokens times token_multiplier: the legacy token quota's count for the same tokens. Informational under operation-credit billing. |
estimated_cost_usd | float | The legacy token quota's list price for billed_tokens. Informational, not a charge: it is neither an invoice line nor the providers' cost. 0.0 can mean no list rate applies to the plan, not that the request was free. |
token_multiplier | float | Plan/operation multiplier applied to actual_tokens to produce billed_tokens. |
Stability. The following fields are a stable public contract: quota_remaining, unlimited, estimated_cost_usd, billed_tokens, actual_tokens, and token_multiplier. You can rely on their names and semantics across releases.
cURL Example
/v1/usagecurl -X GET "https://api.hebbrix.com/v1/usage" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"