Kaiten
Getting Started

Licenses & Entitlements

Create licenses, define entitlements with quotas, and track usage.

Set Up Licenses & Entitlements

Licenses define what a customer can do. Entitlements define the specific quotas, features, or configuration values included in a license.

Key Concepts

ConceptDescription
LicenseA commercial plan (Starter, Pro, Enterprise) with a type (COMMUNITY, TRIAL, DEVELOPMENT, PAID)
EntitlementA usage right: BOOLEAN (on/off), NUMBER (quota with metering), or CONFIG (arbitrary value)
License EntitlementThe link between a license and an entitlement, with a specific threshold value
Entitlement UsageCurrent consumption of an entitlement for a specific instance

1. Create an Entitlement

  1. Navigate to EntitlementsNew Entitlement
  2. Fill in:
    • Name: API Calls
    • Type: NUMBER
    • Meter Type: RAW_EVENT
    • Aggregation Method: SUM
  3. Click Create
curl -X POST http://localhost:6000/api/entitlements \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "API Calls",
    "type": "NUMBER",
    "meterType": "RAW_EVENT",
    "aggregationMethod": "SUM"
  }'

2. Create a License

  1. Navigate to LicensesNew License
  2. Fill in:
    • Name: Growth
    • Type: PAID
    • Version: 1
  3. Click Create
curl -X POST http://localhost:6000/api/licenses \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Growth",
    "type": "PAID",
    "version": "1",
    "isActive": true
  }'

3. Attach Entitlement to License

Link the entitlement to the license with a threshold value:

curl -X POST http://localhost:6000/api/licenses/<license-slug>/entitlements \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "entitlementSlug": "api-calls",
    "value": {
      "type": "number",
      "value": 1000
    }
  }'

This means: instances with the "Growth" license can use up to 1,000 API calls.

4. Report Usage

Once your instance is linked to a license with entitlements, you can report usage:

curl -X POST http://localhost:6000/api/instances/my-restaurant-production/entitlements/api-calls/usage \
  -H "Authorization: Bearer ksh_xxx" \
  -H "Content-Type: application/json" \
  -d '{"value": 42}'

When usage reaches the threshold, Kaiten emits an INSTANCE_ENTITLEMENT_USAGE_REACHED event — perfect for triggering alerts or upsell flows via webhooks.

5. View Usage in the Dashboard

Navigate to Entitlements → click your entitlement → Usage tab to see consumption per instance.

Next Step

Create & Evaluate a Feature Flag

On this page