DocsUsage Summary
Billing
GET /v1/usage/summary
Fetch aggregated usage totals for summary cards and dashboard views.
GET /v1/usage/summaryScope: Depends on API key scopes configured in backend
Best for
Teams building billing dashboards and high-level account summaries.
Summary cards
Total spend
Top models
How to call it
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.
Ready to test with your own key?
Create a general API key in Settings, then come back here to copy a request example.