Skip to content
Ona Docs

Usage

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

GetAdoptionUsageSummary
usage.get_adoption_usage_summary(UsageGetAdoptionUsageSummaryParams**kwargs) -> UsageGetAdoptionUsageSummaryResponse
POST/gitpod.v1.UsageService/GetAdoptionUsageSummary
GetAgentTraceSummary
usage.get_agent_trace_summary(UsageGetAgentTraceSummaryParams**kwargs) -> UsageGetAgentTraceSummaryResponse
POST/gitpod.v1.UsageService/GetAgentTraceSummary
GetAgentTraceTimeSeries
usage.get_agent_trace_time_series(UsageGetAgentTraceTimeSeriesParams**kwargs) -> UsageGetAgentTraceTimeSeriesResponse
POST/gitpod.v1.UsageService/GetAgentTraceTimeSeries
GetCoAuthorSummary
usage.get_co_author_summary(UsageGetCoAuthorSummaryParams**kwargs) -> UsageGetCoAuthorSummaryResponse
POST/gitpod.v1.UsageService/GetCoAuthorSummary
GetCoAuthorTimeSeries
usage.get_co_author_time_series(UsageGetCoAuthorTimeSeriesParams**kwargs) -> UsageGetCoAuthorTimeSeriesResponse
POST/gitpod.v1.UsageService/GetCoAuthorTimeSeries
GetPrSummary
usage.get_pr_summary(UsageGetPrSummaryParams**kwargs) -> UsageGetPrSummaryResponse
POST/gitpod.v1.UsageService/GetPrSummary
GetPrTimeSeries
usage.get_pr_time_series(UsageGetPrTimeSeriesParams**kwargs) -> UsageGetPrTimeSeriesResponse
POST/gitpod.v1.UsageService/GetPrTimeSeries
ListEnvironmentUsageRecords
usage.list_environment_runtime_records(UsageListEnvironmentRuntimeRecordsParams**kwargs) -> SyncRecordsPage[EnvironmentUsageRecord]
POST/gitpod.v1.UsageService/ListEnvironmentUsageRecords
ModelsExpand Collapse
class AgentTraceModelBreakdown:

AgentTraceModelBreakdown contains stats for a single LLM model.

lines_added: Optional[str]

Lines added by sessions using this model.

lines_removed: Optional[str]

Lines removed by sessions using this model.

model: Optional[SupportedModel]

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: Optional[str]

Number of sessions that used this model.

class AgentTraceSummary:

AgentTraceSummary contains aggregate totals for a date range.

by_model: Optional[List[AgentTraceModelBreakdown]]

Per-model breakdown of session stats.

lines_added: Optional[str]

Lines added by sessions using this model.

lines_removed: Optional[str]

Lines removed by sessions using this model.

model: Optional[SupportedModel]

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: Optional[str]

Number of sessions that used this model.

total_lines_added: Optional[str]

Total lines added across all sessions.

total_lines_added_trend: Optional[float]

Fractional change in total_lines_added compared to the previous period.

formatdouble
total_lines_removed: Optional[str]

Total lines removed across all sessions.

total_lines_removed_trend: Optional[float]

Fractional change in total_lines_removed compared to the previous period.

formatdouble
total_sessions: Optional[str]

Total number of agent trace sessions in the date range.

total_sessions_trend: Optional[float]

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
class AgentTraceTimeBucket:

AgentTraceTimeBucket contains stats for a single time period.

by_model: Optional[List[AgentTraceModelBreakdown]]

Per-model breakdown for this bucket.

lines_added: Optional[str]

Lines added by sessions using this model.

lines_removed: Optional[str]

Lines removed by sessions using this model.

model: Optional[SupportedModel]

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: Optional[str]

Number of sessions that used this model.

start_time: Optional[datetime]

Start of this time bucket.

formatdate-time
total_lines_added: Optional[str]

Total lines added in this bucket.

total_lines_removed: Optional[str]

Total lines removed in this bucket.

total_sessions: Optional[str]

Number of agent trace sessions in this bucket.

class CoAuthorSummary:

CoAuthorSummary contains aggregate totals for a date range.

by_tool: Optional[List[ToolBreakdown]]

Per-tool breakdown of contribution stats.

commits: Optional[str]

Number of commits attributed to this tool.

distinct_authors: Optional[str]

Distinct authors who used this tool.

lines_added: Optional[str]

Lines added by this tool.

lines_removed: Optional[str]

Lines removed by this tool.

tool: Optional[CoAuthorTool]

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"
distinct_authors: Optional[str]

Number of distinct authors (by author_hash).

distinct_authors_trend: Optional[float]

Fractional change in distinct_authors compared to the previous period.

formatdouble
total_commits: Optional[str]

Total number of commits in the date range.

total_commits_trend: Optional[float]

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
total_lines_added: Optional[str]

Total lines added across all commits.

total_lines_added_trend: Optional[float]

Fractional change in total_lines_added compared to the previous period.

formatdouble
total_lines_removed: Optional[str]

Total lines removed across all commits.

total_lines_removed_trend: Optional[float]

Fractional change in total_lines_removed compared to the previous period.

formatdouble
class CoAuthorTimeBucket:

CoAuthorTimeBucket contains stats for a single time period.

ai_ratio: Optional[float]

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

formatdouble
by_tool: Optional[List[ToolBreakdown]]

Per-tool breakdown for this bucket.

commits: Optional[str]

Number of commits attributed to this tool.

distinct_authors: Optional[str]

Distinct authors who used this tool.

lines_added: Optional[str]

Lines added by this tool.

lines_removed: Optional[str]

Lines removed by this tool.

tool: Optional[CoAuthorTool]

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"
distinct_authors: Optional[str]

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

start_time: Optional[datetime]

Start of this time bucket.

formatdate-time
total_commits: Optional[str]

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

total_lines_added: Optional[str]

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

total_lines_removed: Optional[str]

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

Literal["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"
class EnvironmentUsageRecord:

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

id: Optional[str]

Environment usage record ID.

created_at: Optional[datetime]

Time when the environment was created.

formatdate-time
environment_class_id: Optional[str]

Environment class ID associated with the record.

environment_id: Optional[str]

Environment ID associated with the record.

project_id: Optional[str]

Project ID associated with the environment (if available).

runner_id: Optional[str]

Runner ID associated with the environment.

stopped_at: Optional[datetime]

Time when the environment was stopped.

formatdate-time
user_id: Optional[str]

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

class PrSummary:

PrSummary contains aggregate PR speed metrics for a date range.

deployment_frequency: Optional[float]

PRs merged to the default branch per week.

formatdouble
deployment_frequency_trend: Optional[float]

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

formatdouble
lead_time_seconds: Optional[float]

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

formatdouble
lead_time_trend: Optional[float]

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

formatdouble
prs_merged_count: Optional[str]

Total PRs merged in the date range.

prs_merged_trend: Optional[float]

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

formatdouble
time_to_first_approval_seconds: Optional[float]

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

formatdouble
time_to_first_approval_trend: Optional[float]

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

formatdouble
class PrTimeBucket:

PrTimeBucket contains PR speed metrics for a single time period.

deploys: Optional[str]

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

lead_time_seconds: Optional[float]

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

formatdouble
prs_merged_count: Optional[str]

Number of PRs merged in this bucket.

start_time: Optional[datetime]

Start of this time bucket.

formatdate-time
time_to_first_approval_seconds: Optional[float]

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

formatdouble
Literal["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"
Literal["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"
class TimeSeriesPoint:
time: Optional[datetime]

Timestamp for this data point.

formatdate-time
value: Optional[int]

The numerical value for this data point.

formatint32
class ToolBreakdown:

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

commits: Optional[str]

Number of commits attributed to this tool.

distinct_authors: Optional[str]

Distinct authors who used this tool.

lines_added: Optional[str]

Lines added by this tool.

lines_removed: Optional[str]

Lines removed by this tool.

tool: Optional[CoAuthorTool]

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"
class UsageGetAdoptionUsageSummaryResponse:
active_users_count: Optional[str]

Count of active users in the date range.

active_users_trend: Optional[float]

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

formatdouble
env_runtime_per_user_seconds: Optional[float]

Average environment runtime in seconds per active user.

formatdouble
env_runtime_per_user_trend: Optional[float]

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

formatdouble
power_users_count: Optional[str]

Count of power users in the date range.

power_users_threshold_seconds: Optional[str]

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

power_users_trend: Optional[float]

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

formatdouble
sessions_count: Optional[str]

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

sessions_trend: Optional[float]

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

formatdouble
sparkline: Optional[List[TimeSeriesPoint]]

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

time: Optional[datetime]

Timestamp for this data point.

formatdate-time
value: Optional[int]

The numerical value for this data point.

formatint32
class UsageGetAgentTraceSummaryResponse:
sparkline: Optional[List[TimeSeriesPoint]]

Sparkline data for card rendering.

time: Optional[datetime]

Timestamp for this data point.

formatdate-time
value: Optional[int]

The numerical value for this data point.

formatint32
summary: Optional[AgentTraceSummary]

Summary totals and trends for the requested date range.

by_model: Optional[List[AgentTraceModelBreakdown]]

Per-model breakdown of session stats.

lines_added: Optional[str]

Lines added by sessions using this model.

lines_removed: Optional[str]

Lines removed by sessions using this model.

model: Optional[SupportedModel]

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: Optional[str]

Number of sessions that used this model.

total_lines_added: Optional[str]

Total lines added across all sessions.

total_lines_added_trend: Optional[float]

Fractional change in total_lines_added compared to the previous period.

formatdouble
total_lines_removed: Optional[str]

Total lines removed across all sessions.

total_lines_removed_trend: Optional[float]

Fractional change in total_lines_removed compared to the previous period.

formatdouble
total_sessions: Optional[str]

Total number of agent trace sessions in the date range.

total_sessions_trend: Optional[float]

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
class UsageGetAgentTraceTimeSeriesResponse:
time_series: Optional[List[AgentTraceTimeBucket]]

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

by_model: Optional[List[AgentTraceModelBreakdown]]

Per-model breakdown for this bucket.

lines_added: Optional[str]

Lines added by sessions using this model.

lines_removed: Optional[str]

Lines removed by sessions using this model.

model: Optional[SupportedModel]

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: Optional[str]

Number of sessions that used this model.

start_time: Optional[datetime]

Start of this time bucket.

formatdate-time
total_lines_added: Optional[str]

Total lines added in this bucket.

total_lines_removed: Optional[str]

Total lines removed in this bucket.

total_sessions: Optional[str]

Number of agent trace sessions in this bucket.

class UsageGetCoAuthorSummaryResponse:
sparkline: Optional[List[TimeSeriesPoint]]

Sparkline data for card rendering.

time: Optional[datetime]

Timestamp for this data point.

formatdate-time
value: Optional[int]

The numerical value for this data point.

formatint32
summary: Optional[CoAuthorSummary]

Summary totals and trends for the requested date range.

by_tool: Optional[List[ToolBreakdown]]

Per-tool breakdown of contribution stats.

commits: Optional[str]

Number of commits attributed to this tool.

distinct_authors: Optional[str]

Distinct authors who used this tool.

lines_added: Optional[str]

Lines added by this tool.

lines_removed: Optional[str]

Lines removed by this tool.

tool: Optional[CoAuthorTool]

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"
distinct_authors: Optional[str]

Number of distinct authors (by author_hash).

distinct_authors_trend: Optional[float]

Fractional change in distinct_authors compared to the previous period.

formatdouble
total_commits: Optional[str]

Total number of commits in the date range.

total_commits_trend: Optional[float]

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
total_lines_added: Optional[str]

Total lines added across all commits.

total_lines_added_trend: Optional[float]

Fractional change in total_lines_added compared to the previous period.

formatdouble
total_lines_removed: Optional[str]

Total lines removed across all commits.

total_lines_removed_trend: Optional[float]

Fractional change in total_lines_removed compared to the previous period.

formatdouble
class UsageGetCoAuthorTimeSeriesResponse:
time_series: Optional[List[CoAuthorTimeBucket]]

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

ai_ratio: Optional[float]

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

formatdouble
by_tool: Optional[List[ToolBreakdown]]

Per-tool breakdown for this bucket.

commits: Optional[str]

Number of commits attributed to this tool.

distinct_authors: Optional[str]

Distinct authors who used this tool.

lines_added: Optional[str]

Lines added by this tool.

lines_removed: Optional[str]

Lines removed by this tool.

tool: Optional[CoAuthorTool]

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"
distinct_authors: Optional[str]

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

start_time: Optional[datetime]

Start of this time bucket.

formatdate-time
total_commits: Optional[str]

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

total_lines_added: Optional[str]

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

total_lines_removed: Optional[str]

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

class UsageGetPrSummaryResponse:
sparkline: Optional[List[TimeSeriesPoint]]

Sparkline data for card rendering.

time: Optional[datetime]

Timestamp for this data point.

formatdate-time
value: Optional[int]

The numerical value for this data point.

formatint32
summary: Optional[PrSummary]

Summary totals and trends for the requested date range.

deployment_frequency: Optional[float]

PRs merged to the default branch per week.

formatdouble
deployment_frequency_trend: Optional[float]

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

formatdouble
lead_time_seconds: Optional[float]

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

formatdouble
lead_time_trend: Optional[float]

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

formatdouble
prs_merged_count: Optional[str]

Total PRs merged in the date range.

prs_merged_trend: Optional[float]

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

formatdouble
time_to_first_approval_seconds: Optional[float]

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

formatdouble
time_to_first_approval_trend: Optional[float]

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

formatdouble
class UsageGetPrTimeSeriesResponse:
time_series: Optional[List[PrTimeBucket]]

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

deploys: Optional[str]

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

lead_time_seconds: Optional[float]

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

formatdouble
prs_merged_count: Optional[str]

Number of PRs merged in this bucket.

start_time: Optional[datetime]

Start of this time bucket.

formatdate-time
time_to_first_approval_seconds: Optional[float]

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

formatdouble