Skip to main content

Billing

The Billing API reports how your workspace consumes AI credits: overall usage, budgets and ceilings, per-user and per-source breakdowns, adoption trends, and MCP tool usage. Most endpoints are read-only reporting. A smaller set lets an admin configure credit budgets and alerts. Every endpoint under /v1/billing requires authentication. Unless noted otherwise, an endpoint requires the calling user to be a workspace admin. A handful of “my” endpoints are self-service and return only the calling user’s own data.

Feature Usage and Limits

AI Credit Budgets

A budget is a ceiling (RateLimit) on AI credit spend over a recurring window (hourly through yearly), optionally scoped to total usage or per-user. Budget endpoints were added after Collate 2.0.2. Requests to them on 2.0.2 return 404. PUT /v1/billing/budgets takes a budgets array (required) of RateLimit objects, each with window (required: HOURLY, FOURHOURS, DAILY, WEEKLY, MONTHLY, YEARLY, or GLOBAL), credits (required), and scope (total or user, defaults to total).

Credit Usage and Breakdowns

Most time-windowed endpoints accept startTs and endTs (epoch milliseconds). /v1/billing/credits/apps/history requires startTs and ignores endTs, so its results cannot be bounded by an end time. The users, sources, cross, and users/{userName}/agents credit-breakdown endpoints accept an optional app query parameter to filter to one application.

Billing Overview and Adoption

MCP Usage

Credit Alerts

A credit alert notifies configured destinations when spend crosses a threshold, such as a percentage of the credit pool used or an unusual daily spike. Credit-alert endpoints were added after Collate 2.0.2. Requests to them on 2.0.2 return 404. PUT /v1/billing/creditAlert takes rules (array of alert rules, default empty), destinations (array of event subscription destinations, default empty), and enabled (default true). Each rule has a type (required: poolPercentUsed, dailyCredits, dailySpike, runCredits, or runwayDays), thresholds, and for dailySpike a multiplier and minAbsolute.

Example

These requests return the remaining credits and, on releases with budget support, set a monthly budget.