Skip to content
Ona Docs

Usage

UsageService provides usage information about environments, users, and projects.

GetAdoptionUsageSummary
client.usage.getAdoptionUsageSummary(UsageGetAdoptionUsageSummaryParams { dateRange, projectId, teamId, userId } body, RequestOptionsoptions?): UsageGetAdoptionUsageSummaryResponse { activeUsersCount, activeUsersTrend, envRuntimePerUserSeconds, 7 more }
POST/gitpod.v1.UsageService/GetAdoptionUsageSummary
GetAgentTraceSummary
client.usage.getAgentTraceSummary(UsageGetAgentTraceSummaryParams { dateRange, projectId, teamId, userId } body, RequestOptionsoptions?): UsageGetAgentTraceSummaryResponse { sparkline, summary }
POST/gitpod.v1.UsageService/GetAgentTraceSummary
GetAgentTraceTimeSeries
client.usage.getAgentTraceTimeSeries(UsageGetAgentTraceTimeSeriesParams { dateRange, projectId, resolution, 2 more } body, RequestOptionsoptions?): UsageGetAgentTraceTimeSeriesResponse { timeSeries }
POST/gitpod.v1.UsageService/GetAgentTraceTimeSeries
GetCoAuthorSummary
client.usage.getCoAuthorSummary(UsageGetCoAuthorSummaryParams { dateRange, projectId, teamId, userId } body, RequestOptionsoptions?): UsageGetCoAuthorSummaryResponse { sparkline, summary }
POST/gitpod.v1.UsageService/GetCoAuthorSummary
GetCoAuthorTimeSeries
client.usage.getCoAuthorTimeSeries(UsageGetCoAuthorTimeSeriesParams { dateRange, projectId, resolution, 2 more } body, RequestOptionsoptions?): UsageGetCoAuthorTimeSeriesResponse { timeSeries }
POST/gitpod.v1.UsageService/GetCoAuthorTimeSeries
GetPrSummary
client.usage.getPrSummary(UsageGetPrSummaryParams { dateRange, projectId, teamId, userId } body, RequestOptionsoptions?): UsageGetPrSummaryResponse { sparkline, summary }
POST/gitpod.v1.UsageService/GetPrSummary
GetPrTimeSeries
client.usage.getPrTimeSeries(UsageGetPrTimeSeriesParams { dateRange, projectId, resolution, 2 more } body, RequestOptionsoptions?): UsageGetPrTimeSeriesResponse { timeSeries }
POST/gitpod.v1.UsageService/GetPrTimeSeries
ListEnvironmentUsageRecords
client.usage.listEnvironmentRuntimeRecords(UsageListEnvironmentRuntimeRecordsParams { token, pageSize, filter, pagination } params, RequestOptionsoptions?): RecordsPage<EnvironmentUsageRecord { id, createdAt, environmentClassId, 5 more } >
POST/gitpod.v1.UsageService/ListEnvironmentUsageRecords
ModelsExpand Collapse
AgentTraceModelBreakdown { linesAdded, linesRemoved, model, sessions }

AgentTraceModelBreakdown contains stats for a single LLM model.

linesAdded?: string

Lines added by sessions using this model.

linesRemoved?: string

Lines removed by sessions using this model.

The model these stats are for.

One of the following:
"SUPPORTED_MODEL_UNSPECIFIED"
"SUPPORTED_MODEL_SONNET_3_5"
"SUPPORTED_MODEL_SONNET_3_7"
"SUPPORTED_MODEL_SONNET_3_7_EXTENDED"
"SUPPORTED_MODEL_SONNET_4"
"SUPPORTED_MODEL_SONNET_4_EXTENDED"
"SUPPORTED_MODEL_SONNET_4_5"
"SUPPORTED_MODEL_SONNET_4_5_EXTENDED"
"SUPPORTED_MODEL_SONNET_4_6"
"SUPPORTED_MODEL_SONNET_4_6_EXTENDED"
"SUPPORTED_MODEL_SONNET_5"
"SUPPORTED_MODEL_OPUS_4"
"SUPPORTED_MODEL_OPUS_4_EXTENDED"
"SUPPORTED_MODEL_OPUS_4_5"
"SUPPORTED_MODEL_OPUS_4_5_EXTENDED"
"SUPPORTED_MODEL_OPUS_4_6"
"SUPPORTED_MODEL_OPUS_4_6_EXTENDED"
"SUPPORTED_MODEL_OPUS_4_7"
"SUPPORTED_MODEL_OPUS_4_8"
"SUPPORTED_MODEL_HAIKU_4_5"
"SUPPORTED_MODEL_OPENAI_4O"
"SUPPORTED_MODEL_OPENAI_4O_MINI"
"SUPPORTED_MODEL_OPENAI_O1"
"SUPPORTED_MODEL_OPENAI_O1_MINI"
"SUPPORTED_MODEL_OPENAI_AUTO"
sessions?: string

Number of sessions that used this model.

AgentTraceSummary { byModel, totalLinesAdded, totalLinesAddedTrend, 4 more }

AgentTraceSummary contains aggregate totals for a date range.

byModel?: Array<AgentTraceModelBreakdown { linesAdded, linesRemoved, model, sessions } >

Per-model breakdown of session stats.

linesAdded?: string

Lines added by sessions using this model.

linesRemoved?: string

Lines removed by sessions using this model.

The model these stats are for.

One of the following:
"SUPPORTED_MODEL_UNSPECIFIED"
"SUPPORTED_MODEL_SONNET_3_5"
"SUPPORTED_MODEL_SONNET_3_7"
"SUPPORTED_MODEL_SONNET_3_7_EXTENDED"
"SUPPORTED_MODEL_SONNET_4"
"SUPPORTED_MODEL_SONNET_4_EXTENDED"
"SUPPORTED_MODEL_SONNET_4_5"
"SUPPORTED_MODEL_SONNET_4_5_EXTENDED"
"SUPPORTED_MODEL_SONNET_4_6"
"SUPPORTED_MODEL_SONNET_4_6_EXTENDED"
"SUPPORTED_MODEL_SONNET_5"
"SUPPORTED_MODEL_OPUS_4"
"SUPPORTED_MODEL_OPUS_4_EXTENDED"
"SUPPORTED_MODEL_OPUS_4_5"
"SUPPORTED_MODEL_OPUS_4_5_EXTENDED"
"SUPPORTED_MODEL_OPUS_4_6"
"SUPPORTED_MODEL_OPUS_4_6_EXTENDED"
"SUPPORTED_MODEL_OPUS_4_7"
"SUPPORTED_MODEL_OPUS_4_8"
"SUPPORTED_MODEL_HAIKU_4_5"
"SUPPORTED_MODEL_OPENAI_4O"
"SUPPORTED_MODEL_OPENAI_4O_MINI"
"SUPPORTED_MODEL_OPENAI_O1"
"SUPPORTED_MODEL_OPENAI_O1_MINI"
"SUPPORTED_MODEL_OPENAI_AUTO"
sessions?: string

Number of sessions that used this model.

totalLinesAdded?: string

Total lines added across all sessions.

totalLinesAddedTrend?: number

Fractional change in total_lines_added compared to the previous period.

formatdouble
totalLinesRemoved?: string

Total lines removed across all sessions.

totalLinesRemovedTrend?: number

Fractional change in total_lines_removed compared to the previous period.

formatdouble
totalSessions?: string

Total number of agent trace sessions in the date range.

totalSessionsTrend?: number

Fractional change in total_sessions compared to the previous period of equal length. Computed as (current - previous) / previous. Zero when there is no previous data.

formatdouble
AgentTraceTimeBucket { byModel, startTime, totalLinesAdded, 2 more }

AgentTraceTimeBucket contains stats for a single time period.

byModel?: Array<AgentTraceModelBreakdown { linesAdded, linesRemoved, model, sessions } >

Per-model breakdown for this bucket.

linesAdded?: string

Lines added by sessions using this model.

linesRemoved?: string

Lines removed by sessions using this model.

The model these stats are for.

One of the following:
"SUPPORTED_MODEL_UNSPECIFIED"
"SUPPORTED_MODEL_SONNET_3_5"
"SUPPORTED_MODEL_SONNET_3_7"
"SUPPORTED_MODEL_SONNET_3_7_EXTENDED"
"SUPPORTED_MODEL_SONNET_4"
"SUPPORTED_MODEL_SONNET_4_EXTENDED"
"SUPPORTED_MODEL_SONNET_4_5"
"SUPPORTED_MODEL_SONNET_4_5_EXTENDED"
"SUPPORTED_MODEL_SONNET_4_6"
"SUPPORTED_MODEL_SONNET_4_6_EXTENDED"
"SUPPORTED_MODEL_SONNET_5"
"SUPPORTED_MODEL_OPUS_4"
"SUPPORTED_MODEL_OPUS_4_EXTENDED"
"SUPPORTED_MODEL_OPUS_4_5"
"SUPPORTED_MODEL_OPUS_4_5_EXTENDED"
"SUPPORTED_MODEL_OPUS_4_6"
"SUPPORTED_MODEL_OPUS_4_6_EXTENDED"
"SUPPORTED_MODEL_OPUS_4_7"
"SUPPORTED_MODEL_OPUS_4_8"
"SUPPORTED_MODEL_HAIKU_4_5"
"SUPPORTED_MODEL_OPENAI_4O"
"SUPPORTED_MODEL_OPENAI_4O_MINI"
"SUPPORTED_MODEL_OPENAI_O1"
"SUPPORTED_MODEL_OPENAI_O1_MINI"
"SUPPORTED_MODEL_OPENAI_AUTO"
sessions?: string

Number of sessions that used this model.

startTime?: string

Start of this time bucket.

formatdate-time
totalLinesAdded?: string

Total lines added in this bucket.

totalLinesRemoved?: string

Total lines removed in this bucket.

totalSessions?: string

Number of agent trace sessions in this bucket.

CoAuthorSummary { byTool, distinctAuthors, distinctAuthorsTrend, 6 more }

CoAuthorSummary contains aggregate totals for a date range.

byTool?: Array<ToolBreakdown { commits, distinctAuthors, linesAdded, 2 more } >

Per-tool breakdown of contribution stats.

commits?: string

Number of commits attributed to this tool.

distinctAuthors?: string

Distinct authors who used this tool.

linesAdded?: string

Lines added by this tool.

linesRemoved?: string

Lines removed by this tool.

The tool these stats are for.

One of the following:
"CO_AUTHOR_TOOL_UNSPECIFIED"
"CO_AUTHOR_TOOL_NO_COAUTHOR"
"CO_AUTHOR_TOOL_HUMAN_COAUTHOR"
"CO_AUTHOR_TOOL_ONA"
"CO_AUTHOR_TOOL_GITHUB_COPILOT"
"CO_AUTHOR_TOOL_CURSOR"
"CO_AUTHOR_TOOL_OTHER"
"CO_AUTHOR_TOOL_CLAUDE"
"CO_AUTHOR_TOOL_CODEX"
distinctAuthors?: string

Number of distinct authors (by author_hash).

distinctAuthorsTrend?: number

Fractional change in distinct_authors compared to the previous period.

formatdouble
totalCommits?: string

Total number of commits in the date range.

totalCommitsTrend?: number

Fractional change in total_commits compared to the previous period of equal length. Computed as (current - previous) / previous. Zero when there is no previous data.

formatdouble
totalLinesAdded?: string

Total lines added across all commits.

totalLinesAddedTrend?: number

Fractional change in total_lines_added compared to the previous period.

formatdouble
totalLinesRemoved?: string

Total lines removed across all commits.

totalLinesRemovedTrend?: number

Fractional change in total_lines_removed compared to the previous period.

formatdouble
CoAuthorTimeBucket { aiRatio, byTool, distinctAuthors, 4 more }

CoAuthorTimeBucket contains stats for a single time period.

aiRatio?: number

Ratio of AI-assisted lines added to total lines added (0.0–1.0).

formatdouble
byTool?: Array<ToolBreakdown { commits, distinctAuthors, linesAdded, 2 more } >

Per-tool breakdown for this bucket.

commits?: string

Number of commits attributed to this tool.

distinctAuthors?: string

Distinct authors who used this tool.

linesAdded?: string

Lines added by this tool.

linesRemoved?: string

Lines removed by this tool.

The tool these stats are for.

One of the following:
"CO_AUTHOR_TOOL_UNSPECIFIED"
"CO_AUTHOR_TOOL_NO_COAUTHOR"
"CO_AUTHOR_TOOL_HUMAN_COAUTHOR"
"CO_AUTHOR_TOOL_ONA"
"CO_AUTHOR_TOOL_GITHUB_COPILOT"
"CO_AUTHOR_TOOL_CURSOR"
"CO_AUTHOR_TOOL_OTHER"
"CO_AUTHOR_TOOL_CLAUDE"
"CO_AUTHOR_TOOL_CODEX"
distinctAuthors?: string

Number of distinct authors (by author_hash) in this bucket.

startTime?: string

Start of this time bucket.

formatdate-time
totalCommits?: string

Total number of commits in this bucket (across all tools).

totalLinesAdded?: string

Total lines added in this bucket (across all tools).

totalLinesRemoved?: string

Total lines removed in this bucket (across all tools).

CoAuthorTool = "CO_AUTHOR_TOOL_UNSPECIFIED" | "CO_AUTHOR_TOOL_NO_COAUTHOR" | "CO_AUTHOR_TOOL_HUMAN_COAUTHOR" | 6 more

CoAuthorTool identifies the AI tool that co-authored a commit. UNSPECIFIED (0) is the proto default and must not appear in reported data. Use HUMAN for commits with no AI co-author.

One of the following:
"CO_AUTHOR_TOOL_UNSPECIFIED"
"CO_AUTHOR_TOOL_NO_COAUTHOR"
"CO_AUTHOR_TOOL_HUMAN_COAUTHOR"
"CO_AUTHOR_TOOL_ONA"
"CO_AUTHOR_TOOL_GITHUB_COPILOT"
"CO_AUTHOR_TOOL_CURSOR"
"CO_AUTHOR_TOOL_OTHER"
"CO_AUTHOR_TOOL_CLAUDE"
"CO_AUTHOR_TOOL_CODEX"
EnvironmentUsageRecord { id, createdAt, environmentClassId, 5 more }

EnvironmentUsageRecord represents a record of an environment from start to stop.

id?: string

Environment usage record ID.

createdAt?: string

Time when the environment was created.

formatdate-time
environmentClassId?: string

Environment class ID associated with the record.

environmentId?: string

Environment ID associated with the record.

projectId?: string

Project ID associated with the environment (if available).

runnerId?: string

Runner ID associated with the environment.

stoppedAt?: string

Time when the environment was stopped.

formatdate-time
userId?: string

User ID is the ID of the user who created the environment associated with the record.

PrSummary { deploymentFrequency, deploymentFrequencyTrend, leadTimeSeconds, 5 more }

PrSummary contains aggregate PR speed metrics for a date range.

deploymentFrequency?: number

PRs merged to the default branch per week.

formatdouble
deploymentFrequencyTrend?: number

Fractional change in deployment_frequency vs previous period. Computed as (current - previous) / previous.

formatdouble
leadTimeSeconds?: number

Median lead time for changes in seconds (first commit → merge).

formatdouble
leadTimeTrend?: number

Fractional change in lead_time_seconds vs previous period. Computed as (current - previous) / previous.

formatdouble
prsMergedCount?: string

Total PRs merged in the date range.

prsMergedTrend?: number

Fractional change in prs_merged_count vs previous period. Computed as (current - previous) / previous.

formatdouble
timeToFirstApprovalSeconds?: number

Median time to first approval in seconds. Zero when no PRs in the range had approvals.

formatdouble
timeToFirstApprovalTrend?: number

Fractional change in time_to_first_approval_seconds vs previous period. Computed as (current - previous) / previous.

formatdouble
PrTimeBucket { deploys, leadTimeSeconds, prsMergedCount, 2 more }

PrTimeBucket contains PR speed metrics for a single time period.

deploys?: string

Total number of deploys (merged PRs) in this bucket.

leadTimeSeconds?: number

Median lead time in seconds for PRs merged in this bucket.

formatdouble
prsMergedCount?: string

Number of PRs merged in this bucket.

startTime?: string

Start of this time bucket.

formatdate-time
timeToFirstApprovalSeconds?: number

Median time to first approval in seconds for PRs in this bucket. Zero when no PRs in the bucket had approvals.

formatdouble
Resolution = "RESOLUTION_UNSPECIFIED" | "RESOLUTION_HOURLY" | "RESOLUTION_DAILY" | 2 more

Resolution specifies the time granularity for time series data.

One of the following:
"RESOLUTION_UNSPECIFIED"
"RESOLUTION_HOURLY"
"RESOLUTION_DAILY"
"RESOLUTION_WEEKLY"
"RESOLUTION_MONTHLY"
SupportedModel = "SUPPORTED_MODEL_UNSPECIFIED" | "SUPPORTED_MODEL_SONNET_3_5" | "SUPPORTED_MODEL_SONNET_3_7" | 22 more

SupportedModel enumerates the LLM models available for agent executions

One of the following:
"SUPPORTED_MODEL_UNSPECIFIED"
"SUPPORTED_MODEL_SONNET_3_5"
"SUPPORTED_MODEL_SONNET_3_7"
"SUPPORTED_MODEL_SONNET_3_7_EXTENDED"
"SUPPORTED_MODEL_SONNET_4"
"SUPPORTED_MODEL_SONNET_4_EXTENDED"
"SUPPORTED_MODEL_SONNET_4_5"
"SUPPORTED_MODEL_SONNET_4_5_EXTENDED"
"SUPPORTED_MODEL_SONNET_4_6"
"SUPPORTED_MODEL_SONNET_4_6_EXTENDED"
"SUPPORTED_MODEL_SONNET_5"
"SUPPORTED_MODEL_OPUS_4"
"SUPPORTED_MODEL_OPUS_4_EXTENDED"
"SUPPORTED_MODEL_OPUS_4_5"
"SUPPORTED_MODEL_OPUS_4_5_EXTENDED"
"SUPPORTED_MODEL_OPUS_4_6"
"SUPPORTED_MODEL_OPUS_4_6_EXTENDED"
"SUPPORTED_MODEL_OPUS_4_7"
"SUPPORTED_MODEL_OPUS_4_8"
"SUPPORTED_MODEL_HAIKU_4_5"
"SUPPORTED_MODEL_OPENAI_4O"
"SUPPORTED_MODEL_OPENAI_4O_MINI"
"SUPPORTED_MODEL_OPENAI_O1"
"SUPPORTED_MODEL_OPENAI_O1_MINI"
"SUPPORTED_MODEL_OPENAI_AUTO"
TimeSeriesPoint { time, value }
time?: string

Timestamp for this data point.

formatdate-time
value?: number

The numerical value for this data point.

formatint32
ToolBreakdown { commits, distinctAuthors, linesAdded, 2 more }

ToolBreakdown contains stats for a single AI tool (or human).

commits?: string

Number of commits attributed to this tool.

distinctAuthors?: string

Distinct authors who used this tool.

linesAdded?: string

Lines added by this tool.

linesRemoved?: string

Lines removed by this tool.

The tool these stats are for.

One of the following:
"CO_AUTHOR_TOOL_UNSPECIFIED"
"CO_AUTHOR_TOOL_NO_COAUTHOR"
"CO_AUTHOR_TOOL_HUMAN_COAUTHOR"
"CO_AUTHOR_TOOL_ONA"
"CO_AUTHOR_TOOL_GITHUB_COPILOT"
"CO_AUTHOR_TOOL_CURSOR"
"CO_AUTHOR_TOOL_OTHER"
"CO_AUTHOR_TOOL_CLAUDE"
"CO_AUTHOR_TOOL_CODEX"
UsageGetAdoptionUsageSummaryResponse { activeUsersCount, activeUsersTrend, envRuntimePerUserSeconds, 7 more }
activeUsersCount?: string

Count of active users in the date range.

activeUsersTrend?: number

Fractional change in active_users_count vs previous period. Computed as (current - previous) / previous.

formatdouble
envRuntimePerUserSeconds?: number

Average environment runtime in seconds per active user.

formatdouble
envRuntimePerUserTrend?: number

Fractional change in env_runtime_per_user_seconds vs previous period. Computed as (current - previous) / previous.

formatdouble
powerUsersCount?: string

Count of power users in the date range.

powerUsersThresholdSeconds?: string

Threshold in seconds used to determine power users. Displayed to users so they understand the definition.

powerUsersTrend?: number

Fractional change in power_users_count vs previous period. Computed as (current - previous) / previous.

formatdouble
sessionsCount?: string

Count of environment sessions (total starts) in the date range.

sessionsTrend?: number

Fractional change in sessions_count vs previous period. Computed as (current - previous) / previous.

formatdouble
sparkline?: Array<TimeSeriesPoint { time, value } >

Sparkline data for the card’s trend line (typically ~4 weekly points).

time?: string

Timestamp for this data point.

formatdate-time
value?: number

The numerical value for this data point.

formatint32
UsageGetAgentTraceSummaryResponse { sparkline, summary }
sparkline?: Array<TimeSeriesPoint { time, value } >

Sparkline data for card rendering.

time?: string

Timestamp for this data point.

formatdate-time
value?: number

The numerical value for this data point.

formatint32
summary?: AgentTraceSummary { byModel, totalLinesAdded, totalLinesAddedTrend, 4 more }

Summary totals and trends for the requested date range.

byModel?: Array<AgentTraceModelBreakdown { linesAdded, linesRemoved, model, sessions } >

Per-model breakdown of session stats.

linesAdded?: string

Lines added by sessions using this model.

linesRemoved?: string

Lines removed by sessions using this model.

The model these stats are for.

One of the following:
"SUPPORTED_MODEL_UNSPECIFIED"
"SUPPORTED_MODEL_SONNET_3_5"
"SUPPORTED_MODEL_SONNET_3_7"
"SUPPORTED_MODEL_SONNET_3_7_EXTENDED"
"SUPPORTED_MODEL_SONNET_4"
"SUPPORTED_MODEL_SONNET_4_EXTENDED"
"SUPPORTED_MODEL_SONNET_4_5"
"SUPPORTED_MODEL_SONNET_4_5_EXTENDED"
"SUPPORTED_MODEL_SONNET_4_6"
"SUPPORTED_MODEL_SONNET_4_6_EXTENDED"
"SUPPORTED_MODEL_SONNET_5"
"SUPPORTED_MODEL_OPUS_4"
"SUPPORTED_MODEL_OPUS_4_EXTENDED"
"SUPPORTED_MODEL_OPUS_4_5"
"SUPPORTED_MODEL_OPUS_4_5_EXTENDED"
"SUPPORTED_MODEL_OPUS_4_6"
"SUPPORTED_MODEL_OPUS_4_6_EXTENDED"
"SUPPORTED_MODEL_OPUS_4_7"
"SUPPORTED_MODEL_OPUS_4_8"
"SUPPORTED_MODEL_HAIKU_4_5"
"SUPPORTED_MODEL_OPENAI_4O"
"SUPPORTED_MODEL_OPENAI_4O_MINI"
"SUPPORTED_MODEL_OPENAI_O1"
"SUPPORTED_MODEL_OPENAI_O1_MINI"
"SUPPORTED_MODEL_OPENAI_AUTO"
sessions?: string

Number of sessions that used this model.

totalLinesAdded?: string

Total lines added across all sessions.

totalLinesAddedTrend?: number

Fractional change in total_lines_added compared to the previous period.

formatdouble
totalLinesRemoved?: string

Total lines removed across all sessions.

totalLinesRemovedTrend?: number

Fractional change in total_lines_removed compared to the previous period.

formatdouble
totalSessions?: string

Total number of agent trace sessions in the date range.

totalSessionsTrend?: number

Fractional change in total_sessions compared to the previous period of equal length. Computed as (current - previous) / previous. Zero when there is no previous data.

formatdouble
UsageGetAgentTraceTimeSeriesResponse { timeSeries }
timeSeries?: Array<AgentTraceTimeBucket { byModel, startTime, totalLinesAdded, 2 more } >

Time series of agent trace stats, bucketed by the requested resolution.

byModel?: Array<AgentTraceModelBreakdown { linesAdded, linesRemoved, model, sessions } >

Per-model breakdown for this bucket.

linesAdded?: string

Lines added by sessions using this model.

linesRemoved?: string

Lines removed by sessions using this model.

The model these stats are for.

One of the following:
"SUPPORTED_MODEL_UNSPECIFIED"
"SUPPORTED_MODEL_SONNET_3_5"
"SUPPORTED_MODEL_SONNET_3_7"
"SUPPORTED_MODEL_SONNET_3_7_EXTENDED"
"SUPPORTED_MODEL_SONNET_4"
"SUPPORTED_MODEL_SONNET_4_EXTENDED"
"SUPPORTED_MODEL_SONNET_4_5"
"SUPPORTED_MODEL_SONNET_4_5_EXTENDED"
"SUPPORTED_MODEL_SONNET_4_6"
"SUPPORTED_MODEL_SONNET_4_6_EXTENDED"
"SUPPORTED_MODEL_SONNET_5"
"SUPPORTED_MODEL_OPUS_4"
"SUPPORTED_MODEL_OPUS_4_EXTENDED"
"SUPPORTED_MODEL_OPUS_4_5"
"SUPPORTED_MODEL_OPUS_4_5_EXTENDED"
"SUPPORTED_MODEL_OPUS_4_6"
"SUPPORTED_MODEL_OPUS_4_6_EXTENDED"
"SUPPORTED_MODEL_OPUS_4_7"
"SUPPORTED_MODEL_OPUS_4_8"
"SUPPORTED_MODEL_HAIKU_4_5"
"SUPPORTED_MODEL_OPENAI_4O"
"SUPPORTED_MODEL_OPENAI_4O_MINI"
"SUPPORTED_MODEL_OPENAI_O1"
"SUPPORTED_MODEL_OPENAI_O1_MINI"
"SUPPORTED_MODEL_OPENAI_AUTO"
sessions?: string

Number of sessions that used this model.

startTime?: string

Start of this time bucket.

formatdate-time
totalLinesAdded?: string

Total lines added in this bucket.

totalLinesRemoved?: string

Total lines removed in this bucket.

totalSessions?: string

Number of agent trace sessions in this bucket.

UsageGetCoAuthorSummaryResponse { sparkline, summary }
sparkline?: Array<TimeSeriesPoint { time, value } >

Sparkline data for card rendering.

time?: string

Timestamp for this data point.

formatdate-time
value?: number

The numerical value for this data point.

formatint32
summary?: CoAuthorSummary { byTool, distinctAuthors, distinctAuthorsTrend, 6 more }

Summary totals and trends for the requested date range.

byTool?: Array<ToolBreakdown { commits, distinctAuthors, linesAdded, 2 more } >

Per-tool breakdown of contribution stats.

commits?: string

Number of commits attributed to this tool.

distinctAuthors?: string

Distinct authors who used this tool.

linesAdded?: string

Lines added by this tool.

linesRemoved?: string

Lines removed by this tool.

The tool these stats are for.

One of the following:
"CO_AUTHOR_TOOL_UNSPECIFIED"
"CO_AUTHOR_TOOL_NO_COAUTHOR"
"CO_AUTHOR_TOOL_HUMAN_COAUTHOR"
"CO_AUTHOR_TOOL_ONA"
"CO_AUTHOR_TOOL_GITHUB_COPILOT"
"CO_AUTHOR_TOOL_CURSOR"
"CO_AUTHOR_TOOL_OTHER"
"CO_AUTHOR_TOOL_CLAUDE"
"CO_AUTHOR_TOOL_CODEX"
distinctAuthors?: string

Number of distinct authors (by author_hash).

distinctAuthorsTrend?: number

Fractional change in distinct_authors compared to the previous period.

formatdouble
totalCommits?: string

Total number of commits in the date range.

totalCommitsTrend?: number

Fractional change in total_commits compared to the previous period of equal length. Computed as (current - previous) / previous. Zero when there is no previous data.

formatdouble
totalLinesAdded?: string

Total lines added across all commits.

totalLinesAddedTrend?: number

Fractional change in total_lines_added compared to the previous period.

formatdouble
totalLinesRemoved?: string

Total lines removed across all commits.

totalLinesRemovedTrend?: number

Fractional change in total_lines_removed compared to the previous period.

formatdouble
UsageGetCoAuthorTimeSeriesResponse { timeSeries }
timeSeries?: Array<CoAuthorTimeBucket { aiRatio, byTool, distinctAuthors, 4 more } >

Time series of contribution stats, bucketed by the requested resolution.

aiRatio?: number

Ratio of AI-assisted lines added to total lines added (0.0–1.0).

formatdouble
byTool?: Array<ToolBreakdown { commits, distinctAuthors, linesAdded, 2 more } >

Per-tool breakdown for this bucket.

commits?: string

Number of commits attributed to this tool.

distinctAuthors?: string

Distinct authors who used this tool.

linesAdded?: string

Lines added by this tool.

linesRemoved?: string

Lines removed by this tool.

The tool these stats are for.

One of the following:
"CO_AUTHOR_TOOL_UNSPECIFIED"
"CO_AUTHOR_TOOL_NO_COAUTHOR"
"CO_AUTHOR_TOOL_HUMAN_COAUTHOR"
"CO_AUTHOR_TOOL_ONA"
"CO_AUTHOR_TOOL_GITHUB_COPILOT"
"CO_AUTHOR_TOOL_CURSOR"
"CO_AUTHOR_TOOL_OTHER"
"CO_AUTHOR_TOOL_CLAUDE"
"CO_AUTHOR_TOOL_CODEX"
distinctAuthors?: string

Number of distinct authors (by author_hash) in this bucket.

startTime?: string

Start of this time bucket.

formatdate-time
totalCommits?: string

Total number of commits in this bucket (across all tools).

totalLinesAdded?: string

Total lines added in this bucket (across all tools).

totalLinesRemoved?: string

Total lines removed in this bucket (across all tools).

UsageGetPrSummaryResponse { sparkline, summary }
sparkline?: Array<TimeSeriesPoint { time, value } >

Sparkline data for card rendering.

time?: string

Timestamp for this data point.

formatdate-time
value?: number

The numerical value for this data point.

formatint32
summary?: PrSummary { deploymentFrequency, deploymentFrequencyTrend, leadTimeSeconds, 5 more }

Summary totals and trends for the requested date range.

deploymentFrequency?: number

PRs merged to the default branch per week.

formatdouble
deploymentFrequencyTrend?: number

Fractional change in deployment_frequency vs previous period. Computed as (current - previous) / previous.

formatdouble
leadTimeSeconds?: number

Median lead time for changes in seconds (first commit → merge).

formatdouble
leadTimeTrend?: number

Fractional change in lead_time_seconds vs previous period. Computed as (current - previous) / previous.

formatdouble
prsMergedCount?: string

Total PRs merged in the date range.

prsMergedTrend?: number

Fractional change in prs_merged_count vs previous period. Computed as (current - previous) / previous.

formatdouble
timeToFirstApprovalSeconds?: number

Median time to first approval in seconds. Zero when no PRs in the range had approvals.

formatdouble
timeToFirstApprovalTrend?: number

Fractional change in time_to_first_approval_seconds vs previous period. Computed as (current - previous) / previous.

formatdouble
UsageGetPrTimeSeriesResponse { timeSeries }
timeSeries?: Array<PrTimeBucket { deploys, leadTimeSeconds, prsMergedCount, 2 more } >

Time series of PR speed metrics, bucketed by the requested resolution.

deploys?: string

Total number of deploys (merged PRs) in this bucket.

leadTimeSeconds?: number

Median lead time in seconds for PRs merged in this bucket.

formatdouble
prsMergedCount?: string

Number of PRs merged in this bucket.

startTime?: string

Start of this time bucket.

formatdate-time
timeToFirstApprovalSeconds?: number

Median time to first approval in seconds for PRs in this bucket. Zero when no PRs in the bucket had approvals.

formatdouble