GET /billing/overview
Updated Oct 1, 20261 minute read
Read the plan and credits
Owners and admins only. The plan, credits left, add-ons, the monthly total, and this period's usage, from the cached billing customer. Money is in microcredits: 1,000,000 is one credit, which is one USD. The card and billing address are never returned.
Part of Billing.
Responses
| Status | Description |
|---|---|
200 | The billing page's numbers. |
400 | The request is malformed, and the message names the field. |
401 | The bearer token is missing, revoked, or expired. |
403 | The token's person does not hold the role this needs. |
429 | Too many requests. Wait the seconds in Retry-After. Limits depend on the plan. See rate limits. |
200 body
| Field | Type | Required | Description |
|---|---|---|---|
plan | "explore" | "standard" | "pro" | No | |
planGranted | boolean | No | |
status | "active" | "past_due" | "canceled" | "none" | No | |
periodStart | number | null | No | |
periodEnd | number | null | No | |
includedMicrocredits | integer | No | |
availableMicrocredits | integer | No | |
monthlyMicrocredits | integer | No | |
purchasedMicrocredits | integer | No | |
freeTasksAllowanceMicrocredits | integer | No | |
recurringTotalUsd | number | No | |
cancellationScheduled | boolean | No | |
addOns | object[] | No | |
addOns[].id | "site" | "api_higher" | "api_highest" | "unlimited_api" | No | |
addOns[].monthlyUsd | number | No | |
addOns[].granted | boolean | No | |
currentPeriodUsage | object | No | |
currentPeriodUsage.amountMicrocredits | integer | No | |
currentPeriodUsage.inputTokens | integer | No | |
currentPeriodUsage.outputTokens | integer | No | |
currentPeriodUsage.quantityByService | object | No | |
currentPeriodUsage.quantityByService.ai | integer | No | |
currentPeriodUsage.quantityByService.email | integer | No | |
currentPeriodUsage.quantityByService.scrape | integer | No |
Example request
curl https://api.median.sh/v1/billing/overview \
-H "Authorization: Bearer $BEARER_AUTH"