Skip to main content
GET
cURL
Retrieve your workspace’s usage and cost for a time window — the same per-request-type breakdown shown in the dashboard, available with your API key. Use it to reconcile billing or power an internal usage dashboard. Usage is aggregated across every Environment in the workspace; it is not scoped to a single Environment or API key.

Choosing a Window

Set the window with a period (trailing days, 1–365, default 30) or an explicit from/to range — never both. from and to are inclusive, must be sent together with from no later than to or today, and can span at most 365 days. Set them to the same day to read a single day’s usage.

Cost

Each request type returns a count and a cost_micros.
Costs are integers in micro-USD — millionths of one US dollar — so amounts stay exact. Divide by 1,000,000 to convert to dollars: 250000 is $0.25. Each category’s cost_micros is its count times your workspace’s configured price for that category; unpriced categories (including video and website artifacts) return a 0 cost.

Next Steps

Check One Event

Submit Events that this usage counts.

Policies

See how each checked Event maps to a request type.

Authorizations

Authorization
string
header
required

API Key required. Format: Bearer wc-your-api-key

Headers

whitecircle-version
string
required

API Version

Query Parameters

period
integer<int32> | null

Trailing window in days (1–365). Mutually exclusive with from/to. Defaults to 30.

Required range: 1 <= x <= 365
from
string<date> | null

Inclusive start day (YYYY-MM-DD). Requires to. Mutually exclusive with period.

to
string<date> | null

Inclusive end day (YYYY-MM-DD). Requires from. Mutually exclusive with period.

Response

Success

from
string<date>
required

Inclusive first day covered (YYYY-MM-DD).

to
string<date>
required

Inclusive last day covered (YYYY-MM-DD).

message
object
required
artifact
object
required
tool
object
required
agent
object
required
function
object
required
reasoning
object
required
total_micros
integer<int64>
required

Total cost across all categories, in millionths of one USD.