Entitlements & Metering

Turn pricing plans into infrastructure rules.

Define what each customer can access and how much they can consume. Kaiten’s server enforces the limits on every usage report, and every crossing becomes an event your billing and sales tools can act on.

Your billing says one thing. Your infrastructure does another.

The mapping between 'what the customer pays for' and 'what they can actually do' is maintained by a spreadsheet, a Confluence page, or if statements buried in application code.

Revenue leakage

Expired trials still access premium features

Quota violations

No one knows limits are exceeded until the monthly invoice

Engineering overhead

Every new plan requires code changes and a deployment

Sales friction

'Let me check with Engineering' — every custom deal waits on a ticket

Entitlements as code. Metering as a service.

Entitlement Types

Four types. One grant model.

Boolean entitlements gate a feature. Numeric entitlements carry quotas and limits, and AI credits are a type of their own. Config entitlements carry a JSON value. Each license grant sets its own limit: hard, soft with an overage allowance, or unlimited.

Real-Time Metering

Track consumption without building a data pipeline.

Your services report each instance’s usage to the Kaiten API — your own, if you self-host — which folds each report in as it arrives, with the method the entitlement declares — SUM, COUNT, MAX, MIN, AVERAGE or LATEST — over windows from an hour to a year.

Threshold Events & Webhooks

Know the second a customer hits their limit.

When usage crosses the warning threshold, reaches the limit or goes past it, Kaiten emits one typed event per crossing, delivered at least once — a signed webhook on Kaiten Cloud, the event stream when you self-host. Point it at a Slack alert, an upsell email, an instance suspension or an overage charge.

Audit Trail

Every usage report. Every limit decision. Recorded.

Every accepted or refused usage report commits its event with the change, and the audit trail is built from that event stream. Query it for debugging, support or your own compliance work.

License-Based Packaging

One license change. Enforced on the next call.

Entitlements are granted by licenses. Move a customer's instance to another license version — an upgrade, a downgrade, a custom deal — and the next usage report or flag evaluation reads the new grants.

Real-time metering in action.

curl
# Report one API call for the acme-production instance
curl -X POST https://app.kaiten.sh/api/instances/acme-production/entitlements/api-calls/usage \
  -H "Authorization: Bearer ksh_your_token" \
  -H "Content-Type: application/json" \
  -d '{ "value": { "type": "number", "value": 1 }, "behavior": "append" }'

# 200: the report is counted in the current window
→ {
    "entitlementSlug": "api-calls",
    "value": { "type": "number", "value": 67434 },
    "limit": { "type": "number", "value": 100000 },
    "currentPeriodStart": "2026-10-01T00:00:00Z",
    "currentPeriodEnd": "2026-11-01T00:00:00Z"
  }

# 409: the report would cross the license limit — refused and recorded, usage unchanged

It’s a table and an if. Until it isn’t.

Storing a limit is easy. Everything around it is where in-house entitlement code grows: windows, overage, signals and an audit trail that has to agree with the server.

CapabilityKaitenBuilt in-house
Hard, soft and unlimited limitsSet per grant; 409 past the allowanceA branch per plan, in every check
Usage windowsHourly to yearly, calendar- or license-aligned, gap-freeA scheduled job, and the timezone questions that come with it
Refused usageRefused, recorded, stored usage untouchedWhatever each call site decided
Early warningsWarning, reached and exceeded, emitted once per crossingDeduplication you write and maintain
Flags that read the quotaBuilt into targeting rulesAnother join between two systems
Audit trailEvery accepted and refused report recorded and attributedLogs, if someone added them
Who maintains itWe do, and Kaiten’s own create path is built on itYour team, for as long as the product lives