get_workspace_budget
Workspace Analytics & Billing: the budget of ONE Enterprise workspace, read now (not a date range). Needs a workspace reporting key (wdr_report_…, made by the workspace Owner) for that workspace, or your own sign-in as its Owner or Admin (the whole workspace) or Member (only your own numbers: your wallet, held and used credits; granted, sources and pool_available_credits are null). Returns data + meta. data.granted = every grant and top-up that added credits to the workspace since it began: credits (bonus included), usd (what was paid or granted in $; null when any grant has no $ amount) and how many grants. data.sources = the same split by source (apero_budget = a budget from Wandura, topup = a card purchase). data.pool_available_credits = credits in the shared pool not yet given to anyone. data.wallets = each member wallet: available_credits (spendable now) and held_credits (reserved by runs still in progress). data.held_credits = all credits reserved by runs in progress (they may still be refunded). data.used_credits = credits spent since the workspace began: gross_debit (charged), refunded, net = gross_debit − refunded (net includes held_credits). Moving credits between the pool and a wallet (allocate / reclaim) is never counted as cost. Money: effective_cents_per_credit = total $ granted ÷ total credits received, one price for the whole workspace (method v1-binh-quan); list_cents_per_credit = 1 (1 credit = $0.01 list price); used_cost_effective_usd = net × effective price, used_cost_list_usd = net × list price. When a price is unknown it is null (never 0) and meta.missing_fields says why. Times are ISO 8601 in Asia/Ho_Chi_Minh (+07:00): data.computed_at and meta.data_as_of = when this was computed; meta.earliest_available_at = the workspace's first credit movement. Free; at most 60 calls a minute per key or person. The same report as CSV: GET /api/v1/workspaces/{workspace_id}/reports/get_workspace_budget?format=csv.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace_id | Yes | The workspace: the one the reporting key belongs to, or one you are a member of. |