---
title: "Calls Usage"
method: POST
path: "/calls/usage"
tags: ["Calls"]
---

# Calls Usage

`POST /calls/usage`

## Request

- Base URL: `https://trace.wandb.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://trace.wandb.ai/calls/usage`
- Auth: none declared

Compute aggregated usage for multiple root calls, with descendant rollup.

## Request body

- CallsUsageReq: Request complete descendant usage for calls in bounded trace batches.
  - `project_id` string, required
  - `call_ids` string[], required: Root call IDs to aggregate. Each result key corresponds to one input call ID.
  - `include_costs` boolean: If true, include cost calculations in the usage.
  - `limit` integer: Maximum calls per aggregation batch. Larger batches are split by trace; a single trace exceeding this limit returns an error, never partial usage.

## Response `200`

Successful Response

- CallsUsageRes: Response with aggregated usage metrics per root call.
  - `call_usage` object, required
  - `unfinished_call_ids` string[], required

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-16** `dd89fadfe4e4`: 15 info
  - the endpoint scheme security `HTTPBasic` was removed from the API
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
  - the response property `call_usage` became required for the status `200`
  - …11 more
- **2026-02-02** `89d8b5498754`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/wandb/apis/weights-biases-weave-stainless-api/changes/calls/usage/post.md)

---

[API](https://skmtc.dev/wandb/apis/weights-biases-weave-stainless-api.md) - [All operations](https://skmtc.dev/wandb/apis/weights-biases-weave-stainless-api/llms.txt) - [OpenAPI document](https://skmtc.dev/wandb/apis/weights-biases-weave-stainless-api/revisions/f7643c49bf2e?raw)
