Grouped cost alerts are a paid add‑on and aren’t available on all Orb plans. Contact your Orb account team to learn more.
- Per‑seat spend caps in usage‑based seat pricing (
grouping_keys: ["seat_id"]). - Per‑end‑user budgets when you resell or wrap Orb (
grouping_keys: ["customer_id"]). - Per‑model, per‑region budgets in inference pricing (
grouping_keys: ["model", "region"]).
cost_exceeded alert. It cannot be changed afterward; create a new alert to change the grouping. A subscription (or plan) can have at most 3 grouped cost alerts.
Configuration
Which prices contribute
Within the alert’s currency (and anyprice_filters), every usage‑based and license price on the draft invoice contributes to the per‑group subtotals. Fixed fees and composite prices are excluded—a fixed fee has no usage to group by, and a composite price is derived from other line items rather than from an independent metric.
For license prices, grouped subtotals are computed as a per‑group
quantity × rate and do not account for per‑license pool drawdowns. The grouped value is a usage‑attribution estimate at the marginal rate, not a reconciliation of the invoice. On license‑priced plans, the sum of per‑group subtotals will not match the line item’s billed amount, which reflects the aggregate overage after drawdowns. Set thresholds accordingly.Per‑group threshold overrides
By default every group is evaluated against the samethresholds. threshold_overrides lets you tailor thresholds for specific groups—give an enterprise tenant a higher cap, or silence an internal test group entirely.
Each override maps a specific combination of grouping_keys values to a list of thresholds that fully replaces the defaults for that group:
- A non‑empty
thresholdslist replaces the default thresholds for that group. - An empty
thresholdslist silences that group—it never fires. - Groups without an override use the default
thresholds.
threshold_overrides, because the relevant group values vary from subscription to subscription.
Example
Create a subscription cost alert withPOST /v1/alerts/subscription_id/{subscription_id} that fires at $500 per seat_id, ignores the platform fee, raises the cap for one seat, and silences an internal seat:
Cardinality limit
Because each distinct group is evaluated separately, grouping on a high‑cardinality property (for example a per‑event ID) can produce an unbounded number of groups. To protect evaluation, Orb caps a grouped alert at 1,000 distinct groups per evaluation. If a subscription exceeds that limit, Orb automatically disables the alert for that subscription and emits asubscription.alert_disabled webhook so you can react. Choose grouping keys with bounded cardinality (seats, tenants, models) rather than unbounded identifiers.
Webhooks
When groups cross a threshold, Orb batches all groups that fired in the same evaluation timeframe into onesubscription.grouped_cost_exceeded webhook—rather than one webhook per group—with the timeframe window in the payload. A single webhook covers up to 1,000 groups, matching the cardinality limit above.