Available on the Enterprise plan. Contact sales to learn more.
credits field is never populated. For budget concepts, see User budgets.
Usage reports, CSV exports, and team cost budget calculations refresh about every 15 minutes and include available current-hour usage. Local-date boundaries are approximated to the nearest hour, with a maximum difference of 30 minutes.
BYOK price changes can take effect from the first day of the month three months before the current UTC month, or on any future date. For example, in June the earliest allowed date is March 1. Omitting the effective date uses the current time. Older dates are rejected without saving a price or changing aggregation progress.
For prices effective now or in the past, the existing aggregation job recalculates that organization’s usage from the UTC hour containing the effective date through the present. Each hour’s existing summaries remain visible until their replacements are ready. Earlier summaries, other organizations, and raw usage events are unchanged; stored prices continue to apply according to their effective dates. Future-dated prices apply as aggregation processes usage at or after their effective time.
For Enterprise credit reporting, see the Enterprise credit usage API.
Authentication
All endpoints accept a Bearer token: a personal access token (acts as you) or a service account token (owned by the organization, recommended for ongoing automation).filter.subject to themselves on the per-user endpoints.
Request format
Every endpoint is a POST with a JSON body:
Responses follow three conventions:
- Costs are reported as
costMicrounits: millionths of the billingcurrencyunit, so"84500000"withBILLING_CURRENCY_USDis $84.50. Currencies areBILLING_CURRENCY_USD,BILLING_CURRENCY_EUR, orBILLING_CURRENCY_GBP. - 64-bit integer fields (costs, token counts, limits) are returned as JSON strings, per protobuf JSON encoding. Parse them as integers.
calculatedAtis the time through which usage has been calculated. Usage after that timestamp may still be processing, and fields with zero values are omitted from responses.
Organization usage summary
Returns organization-wide spend and token counts for the date range, the monthly budget when one applies, and a per-model breakdown. Usage that no configured BYOK rate matched is reported separately asunpricedUsage.
Endpoint: POST https://app.gitpod.io/api/gitpod.v1.BillingService/GetEnterpriseAIUsageSummary
Request:
budget is unset when no monthly budget applies to the organization. Token types are BYOK_RATE_CARD_TOKEN_TYPE_INPUT, BYOK_RATE_CARD_TOKEN_TYPE_OUTPUT, BYOK_RATE_CARD_TOKEN_TYPE_CACHE_READ, and BYOK_RATE_CARD_TOKEN_TYPE_CACHE_WRITE.
Per-team usage
Returns spend per team, with each team’s monthly budget when one applies. Filter to specific teams withfilter.teamIds (up to 100).
Endpoint: POST https://app.gitpod.io/api/gitpod.v1.BillingService/ListEnterpriseAITeamUsage
Request:
Per-user usage
Returns spend for each user and service account with attributed usage, including each subject’s effective monthly budget. Usage not attributed to a user or service account is excluded, so the sum across subjects can be less than the organization totals. Budget fields (monthToDateUsage, utilizationPercent, overBudget) are computed from usage inside the requested date range measured against the monthly limit. Send a range that starts on the first day of the month for true month-to-date figures.
Endpoint: POST https://app.gitpod.io/api/gitpod.v1.BillingService/ListEnterpriseAIUserUsage
Request (top spenders first):
SORT_FIELD_USAGE (default, spend), SORT_FIELD_DISPLAY_NAME, SORT_FIELD_BUDGET, SORT_FIELD_BUDGET_USED. Subjects without a budget sort last on the budget fields. noCap is true for subjects explicitly exempted from budget limits.
To restrict the list to one user or service account:
Daily time series
Returns one entry per day with spend totals and per-user, per-team, and per-model breakdowns. Per-user entries cover the top spenders, with the rest grouped into an “Others” bucket (emptyuserId).
When filter.subject is set, the response contains only that subject’s usage: daily totals and the team breakdown are omitted, and the model breakdown covers the subject only.
Endpoint: POST https://app.gitpod.io/api/gitpod.v1.BillingService/GetEnterpriseAIUsageTimeSeries
Request: