アカウント
使用状況を取得
指定期間の支出/リクエスト数/トークン統計を、モデル別、API キー別、アプリ名(app_name)別の 3 つの軸で分けて返し、さらに日次の時系列も含みます。/v1/insights と異なり、このエンドポイントには上位モデルランキング、キャッシュ統計、年間ヒートマップはありません——より軽量な集計エンドポイントで、カスタム日付範囲(period=custom)に対応しています。
GET
/api/v1/usage認証
Authorization必須string · header
Authorization ヘッダーに Bearer トークンとして API キーを渡します。
クエリパラメータ
periodstring
統計期間、デフォルトは month。3 種類:従来の暦語(day/week/month/year)、現在を終点とするローリングウィンドウ(15m…1y)、暦に整列した期間(today…prev_year)、または custom(from/to が必要)。認識できない値は 400 を返します。
dayweekmonthyear15m30m1h3h1d2d1w1mo1ytodayyesterdaythis_weekprev_weekthis_monthprev_monththis_yearprev_yearcustomExample:
"month"fromstring
カスタム期間の開始(ISO 8601)。period=custom のときのみ使用されます。
ISO 8601, required with period=custom
Example:
"2026-07-01T00:00:00.000Z"tostring
カスタム期間の終了(ISO 8601)。period=custom のときのみ使用されます。
ISO 8601, required with period=custom
Example:
"2026-07-27T00:00:00.000Z"レスポンス例