Get Workspace costs
get_workspace_costsRetrieve the amount charged to a Workspace or task group over a time window, including total, coverage, and per-run charges. No runs start and no data changes.
Instructions
Get the amount charged to the account's balance for the runs of a Workspace, or of one task group in it, in a time window: the total, how complete it is (coverage), and the charges that make it up per run. A token limit is not a cost. No run starts and nothing changes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End of the window, RFC 3339, not in the future. Omitted, now. The window is at most 366 days. | |
| from | No | Start of the window, RFC 3339. Omitted, 30 days before to. | |
| workspace_id | Yes | The Workspace UUID. | |
| task_group_id | No | Only report the charges of this task group of the Workspace. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The Workspace or task group UUID. | |
| to | Yes | End of the time window, RFC 3339. | |
| from | Yes | Start of the time window, RFC 3339. | |
| rows | Yes | The charges that make up the total, one row per run and kind of usage, at most 200. | |
| notes | Yes | What the total includes and excludes. | |
| scope | Yes | workspace or task_group. | |
| coverage | Yes | partial when charges were found and unavailable when none were. The total is the sum of the charges linked to runs in this scope, not a complete cost; notes say what it leaves out. | |
| rows_truncated | No | True when the scope has more than 200 charge rows; the total still includes all of them. | |
| charged_micro_usd | Yes | The total charged to the account's balance for runs in this scope and window, in micro-US-dollars. | |
| pending_compute_runs | Yes | Runs whose compute charge is not settled yet; the total grows when they settle. |