Skip to main content

Daily Usage

Get per-day credit usage breakdown for the specified period (default last 30 days) with call counts and token totals per day.

Get a per-day breakdown of API usage over a configurable period. Each entry includes the total number of API calls, input/output token counts, and estimated cost for that calendar date. Use this for usage trend analysis and daily cost monitoring.

Call this endpoint to populate daily usage charts or to set up alerting on cost spikes. The default lookback is 30 days — use the days query parameter to widen or narrow the window. Days with zero API calls are omitted from the response array.

Each entry contains a date (YYYY-MM-DD in UTC), calls (total API calls), input_tokens, output_tokens, and cost_usd. All timestamps are UTC — a call made at 23:59 UTC on a given date appears under that UTC date, not the caller's local date.

Daily usage is ordered by date ascending, making it ready for time-series charting without client-side sorting. Pair with the Usage Summary endpoint for operation-level breakdowns within the same period.

Combine this endpoint with Balance to correlate daily burn against remaining runway. If you notice a cost spike on a specific date, drill into the Usage Log to identify the individual requests responsible.

GET/v1/credits/usage/daily

Response

Response fields

[].datestringCalendar date (YYYY-MM-DD).
[].callsintegerNumber of API calls on this date.
[].input_tokensintegerTotal input tokens on this date.
[].output_tokensintegerTotal output tokens on this date.
[].cost_usdnumberEstimated cost in USD on this date.

Response

[
  {
    "date": "2024-09-14",
    "calls": 87,
    "input_tokens": 373410,
    "output_tokens": 53244,
    "cost_usd": 1.92
  },
  {
    "date": "2024-09-15",
    "calls": 143,
    "input_tokens": 614010,
    "output_tokens": 87516,
    "cost_usd": 3.16
  }
]

Errors

Error responses

401unauthorizedMissing or invalid API key.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.