Skip to main content
Unary · Billing Returns a daily credit usage report for an enterprise organization. Each day reports org-wide credits by usage type, plus per-user, per-team, per-environment, and per-conversation breakdowns (top consumers with the remainder aggregated into an “Others” bucket) and a per-model breakdown of intelligence usage. Use this method to:
  • Chart daily credit consumption over a date range
  • Attribute credit usage to users, teams, environments, and conversations
  • Restrict the report to a single user or service account

Examples

  • Get the report for January: Both dates are inclusive and the range must not exceed 31 days.

Authorization

Requires billing:read_usage permission on the organization. A user without it can read their own usage by setting filter.subject to their own user identity; this self-access path is not available to service accounts.

Endpoint

Send a Bearer token as described in Authentication. If your organization uses a custom management-plane domain, replace https://app.ona.com with that domain.

Request example

Request

gitpod.v1.GetCreditUsageReportRequest

Response

gitpod.v1.GetCreditUsageReportResponse
AgentExecutionCreditUsage contains a single agent execution’s credit usage for a day, broken down by type.gitpod.v1.AgentExecutionCreditUsage
CreditUsageReportFilter narrows the data returned by GetCreditUsageReport. Wrapping filters in a message (rather than adding bare fields) lets future filters (team, environment, resource kind) be added without further breaking changes.gitpod.v1.CreditUsageReportFilter
CreditsByType contains credits consumed for a single usage type.gitpod.v1.CreditsByType
DailyCreditUsage contains credit usage for a single day.gitpod.v1.DailyCreditUsage
DateRange specifies a time period for queries.gitpod.v1.DateRange
gitpod.v1.EnterpriseAIUsageByModel
EnvironmentCreditUsage contains a single environment’s credit usage for a day, broken down by type.gitpod.v1.EnvironmentCreditUsage
gitpod.v1.Subject
TeamCreditUsage contains a single team’s credit usage for a day, broken down by type.gitpod.v1.TeamCreditUsage
UserCreditUsage contains a single user’s credit usage, broken down by type.gitpod.v1.UserCreditUsage
UsageType identifies the category of usage.