Skip to content
Median
Esc
↑↓navigate↵open⌘Jpreview

Read usage history

AI, email and scraping usage. One USD is 1,000,000 integer microcredits. Only customer charges and neutral labels are returned. Maximum date range is 366 days. Follow every cursor for complete history.

GET/billing/usage
Authorization
AuthorizationBearer token · headerrequired
`MEDIAN_KEY` from Settings under API, or an MCP OAuth access token. A key acts as the organization; a token acts as the person who approved it.
Query parameters
fromnumber
Inclusive Unix timestamp in milliseconds; defaults to 30 days before the end.
tonumber
Inclusive Unix timestamp in milliseconds; defaults to now.
limitinteger
Records per page.
min 1 · max 100 · default: 100
cursorstring
Continuation cursor. An empty filtered page may still have a continuation.
Responses
200Local organization records.
pageobject[]required
isDonebooleanrequired
continueCursorstringrequired
401Invalid or missing credentials.
403The authenticated role cannot read these records.
429Shared organization API allowance or temporary fair-use protection reached. Retry-After states the delay.
Request
curl -X GET "https://api.median.sh/v1/billing/usage" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "page": [
    {}
  ],
  "isDone": true,
  "continueCursor": "string"
}