usage
orc usage get は、対象Workspaceの利用記録を時間bucketで集計します。モデル、API key ID、endpoint groupで分け、API key IDで対象を絞り込めます。
--start-time は必須のRFC 3339日時で、その時刻を含みます。--end-time は含まない上限で、開始より後を指定します。範囲は最大90日です。終了を省略すると各requestの現在時刻を使うため、ページ送りでは終了を明示して範囲を固定します。
使い方
orc usage get --start-time 2026-09-01T00:00:00Z --end-time 2026-10-01T00:00:00Z期間を固定して取得します。
集計とページ送り
group化を省略すると各bucket内の該当記録を集計します。保存された値がnullのgroup項目は結果から省略されます。--cursor は返された値を変更せず使い、範囲・filter・group条件を維持します。
サブコマンド
get
--bucket-width は 1h または 1d で、既定値は 1d です。--group-by は model、api_key_id、endpoint_group をカンマで区切ります。--api-key-ids は識別子を指定し、秘密のkey値を渡しません。
orc usage get [options]固有のオプション
--start-time
Inclusive lower bound for usage records, as an RFC 3339 timestamp. Required. The range from start_time to end_time cannot exceed 90 days.
型: string。必須。
orc usage get --start-time <value>--end-time
Exclusive upper bound for usage records. Must be after start_time. Defaults to the time of each request; set it explicitly to keep a fixed range across pages.
型: string。任意。
orc usage get --end-time <value>--bucket-width
Time bucket width. Defaults to 1d.; enum: 1h|1d
型: string。任意。
orc usage get --bucket-width <value>--group-by
Split each time bucket by one or more selected dimensions. Omit to aggregate all matching records in each bucket. Use repeated HTTP query parameters, for example group_by=model&group_by=endpoint_group. A grouping field is omitted from a result when its stored value is null.; csv of: model|api_key_id|endpoint_group
型: string。任意。
orc usage get --group-by <value>--api-key-ids
Include records attributed to any of these API key IDs. Omit for all keys in the workspace. Use repeated parameters, such as api_key_ids=key_a&api_key_ids=key_b; pass identifiers, never secret key values.; csv
型: string。任意。
orc usage get --api-key-ids <value>使用例
モデルごとのJSONを取得します。
orc usage get --start-time 2026-09-01T00:00:00Z --end-time 2026-10-01T00:00:00Z --group-by model --jsonモデルごとのJSONを取得します。
必要な権限
認証し、対象Workspaceを選択して実行します。対象Workspaceへのアクセスが必要です。
グローバルオプション
orc usage では、次のグローバルオプションを使用できます。
各オプションの詳細と使用例は、グローバルオプションを参照してください。