Skip to content

Get Task Cost

GET/v1/tasks/{task_id}/cost

Retrieve the asynchronous settlement status, final cost, and token usage for a recent SandBase task.

Path parameters

stringtask_idrequired

Opaque task ID returned by a billable operation, including an x-task-id response header when present.

Response

booleansettledrequired

Whether final cost settlement has completed. cost is not final until it is true.

stringcost · estimated_costrequired

USD amounts with six decimal places. estimated_cost is a best-effort reference before settlement.

objectusagerequired

Token counts recorded for the task.

Optional<object>pricing

After settlement, when a discount was recorded: original_cost, discount_amount, discount_percent, and optional discount_type. original_cost minus discount_amount equals cost.