14 pages for modelusage.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
Events
Claude Developer Platform · in the page
api/beta/sessions/events
…while evaluation was in progress. - `usage: BetaManagedAgentsSpanModelUsage` Aggregate token usage for this evaluation cycle. Sums across all grader model requests within the cycle.…
List Events
Claude Developer Platform · in the page
api/beta/sessions/events/list
…while evaluation was in progress. - `usage: BetaManagedAgentsSpanModelUsage` Aggregate token usage for this evaluation cycle. Sums across all grader model requests within the cycle.…
Stream Events
Claude Developer Platform · in the page
api/beta/sessions/events/stream
…while evaluation was in progress. - `usage: BetaManagedAgentsSpanModelUsage` Aggregate token usage for this evaluation cycle. Sums across all grader model requests within the cycle.…
Threads
Claude Developer Platform · in the page
api/beta/sessions/threads
…while evaluation was in progress. - `usage: BetaManagedAgentsSpanModelUsage` Aggregate token usage for this evaluation cycle. Sums across all grader model requests within the cycle.…
Events
Claude Developer Platform · in the page
api/beta/sessions/threads/events
…while evaluation was in progress. - `usage: BetaManagedAgentsSpanModelUsage` Aggregate token usage for this evaluation cycle. Sums across all grader model requests within the cycle.…
List Session Thread Events
Claude Developer Platform · in the page
api/beta/sessions/threads/events/list
…while evaluation was in progress. - `usage: BetaManagedAgentsSpanModelUsage` Aggregate token usage for this evaluation cycle. Sums across all grader model requests within the cycle.…
Stream Session Thread Events
Claude Developer Platform · in the page
api/beta/sessions/threads/events/stream
…while evaluation was in progress. - `usage: BetaManagedAgentsSpanModelUsage` Aggregate token usage for this evaluation cycle. Sums across all grader model requests within the cycle.…
reference
Claude Developer Platform · in the page
managed-agents/reference
…del inference call has completed. Includes `model_usage` (java, php: `modelUsage`; csharp, go: `ModelUsage`) with token counts.…
How the agent loop works
Claude Code CLI · in the page
agent-sdk/agent-loop
…u read them. The `usage` field covers only the main agent loop. Use `modelUsage`, or `model_usage` in Python, for whole-tree token and cost accounting. See [Tracking costs and usage](/docs/en/agent-s…
Track cost and usage
Claude Code CLI · in the page
agent-sdk/cost-tracking
…(`message.message.id`, `message.message.usage`), per-model cost via `modelUsage` on the result message, and a cumulative total on the result message. * **Python** provides per-step token breakdowns o…
Agent SDK reference - Python
Claude Code CLI · in the page
agent-sdk/python
…e = None structured_output: Any = None model_usage: dict[str, ModelUsage] | None = None permission_denials: list[Any] | None = None deferred_tool_use: DeferredToolUse | None = None…
Agent SDK reference - TypeScript
Claude Code CLI · in the page
agent-sdk/typescript
…r; total_cost_usd: number; usage: NonNullableUsage; modelUsage: { [modelName: string]: ModelUsage }; permission_denials: SDKPermissionDenial[]; queued_turn_count?: number…
Claude Code changelog
Claude Code CLI · in the page
changelog
…er with `--add-dir` for the rule to cover it * Fixed `/cost` and SDK `modelUsage` reporting a turn under the wrong model when the server answered a refusal with a different fallback model than the cli…
Model configuration
Claude Code CLI · in the page
model-config
…utput-format json` and `stream-json`; read the actual model from the `modelUsage` field of the [result message](/docs/en/headless.md#get-structured-output) instead. For example, start a session on Op…