ドキュメントUsage Summary
Billing

GET /v1/usage/summary

Fetch aggregated usage totals for summary cards and dashboard views.

GET /v1/usage/summary権限: 実際の backend API key scope 設定に依存します

向いている用途

Teams building billing dashboards and high-level account summaries.

Summary cards
Total spend
Top models

呼び出し例

bash

curl --request GET \
  --url "https://api.midsync.dev/v1/usage/summary" \
  --header "Authorization: Bearer <midsync_api_key>"

What this API is for

Use this endpoint for overview cards.

It complements usage logs by giving totals instead of per-request rows.

Parameters

date range

Optional date window for summary aggregation if supported.

groupBy

Optional grouping such as by model when supported.

Response fields

totalPointsCharged

Total charged points for the selected period.

totalRequests

Total requests in the selected period.

totalInputTokens / totalOutputTokens

Aggregated token totals when relevant.

byModel

Per-model summary breakdown.

Summary response shape

Summary response shape

json

{
  "totalPointsCharged": 1234.56,
  "totalRequests": 321,
  "totalInputTokens": 120000,
  "totalOutputTokens": 45000,
  "byModel": [
    {
      "model": "gpt-5-4",
      "requests": 120,
      "pointsCharged": 530.12
    }
  ]
}

Frontend notes

  • Use this endpoint for dashboard cards.
  • Show total points, total requests, and top models first.
  • Pair it with usage logs for detailed drill-down.

すぐに試したいですか?

Settings で general API key を作成してから、ここに戻ってリクエスト例をコピーしてください。

API キーを開く