Events
Grant-level events
credits.granted
— A new credits grant (block) was created.credits.grant.updated
— An existing credits grant changed (e.g., amount, dates, cost).credits.grant.usage_low
— A specific grant crossed the configured low-credits threshold.credits.grant.depleted
— A specific grant’s balance reached zero.credits.expired
— A grant reached its expiration time.
Balance-level events
credits.balance.usage_low
— Aggregate balance (per customer/resource/currency) fell below the configured threshold.credits.balance.depleted
— Aggregate balance (per customer/resource/currency) reached zero.
Credit consumption
Field | Data type (typical) | Notes |
---|---|---|
environment_id | string/uuid | Environment identifier |
customer_id | string/uuid | Customer identifier |
resource_id | string/uuid | Resource identifier |
event_id | string/uuid | Usage event identifier |
feature_id | string/uuid | Metered feature identifier |
partial_cost | decimal | Portion of cost attributed to a specific grant/block |
total_cost | decimal | Total cost of the event across all grants/blocks |
credit_grant_id | string/uuid | Reference to the credit grant used |
credit_currency_id | string/uuid | Credit currency identifier |
consumption_timestamp | timestamp | When consumption was recorded |
event_timestamp | timestamp | When the underlying event occurred |
created_at | timestamp | Ingestion/row creation time |
Credit grants
Field | Data type (typical) | Notes |
---|---|---|
id | string/uuid | Primary identifier of the credit grant |
created_at | timestamp | Row creation time |
updated_at | timestamp | Last update time |
account_id | string/uuid | Account identifier |
environment_id | string/uuid | Environment identifier |
display_name | string | Human-readable name/label |
amount | decimal | Granted credits amount |
consumed_amount | decimal | Credits consumed from this grant |
grant_type | string/enum | Grant category/type (e.g., promo, purchase) |
priority | integer | Consumption priority among grants |
effective_at | timestamp | When the grant becomes usable |
expire_at | timestamp | When the grant expires |
additional_meta_data | json | Arbitrary metadata |
comment | string | Optional note/comment |
customer_id | string/uuid | Customer identifier |
customer_ref_id | string | External/customer reference ID |
resource_id | string/uuid | Resource identifier |
resource_ref_id | string | External/resource reference ID |
custom_currency_id | string/uuid | Reference to custom currency (if applicable) |
currency_id | string/uuid | Reference to base currency |
cost_amount | decimal | Monetary cost amount (if tracked) |
cost_currency | string | ISO currency code for cost_amount |
credit_grant_id | string/uuid | Grant identifier (if separate from id ) |
Custom currencies
Field | Data type (typical) | Notes |
---|---|---|
id | string/uuid | Primary identifier |
created_at | timestamp | Row creation time |
updated_at | timestamp | Last update time |
account_id | string/uuid | Account identifier |
environment_id | string/uuid | Environment identifier |
display_name | string | Currency display name |
currency_id | string/uuid | Base currency reference |
symbol | string | Display symbol (e.g., “AIT”) |
description | string | Optional description |
additional_meta_data | json | Arbitrary metadata |
units_singular | string | Singular unit label (e.g., “AI Token”) |
units_plural | string | Plural unit label (e.g., “AI Tokens”) |