struct

Anthropic::DeltaUsage

Inherits JSON::Serializable < Struct < Value < Object

Usage statistics for streaming delta events

In streaming message_delta events, output_tokens is always present. Other fields (including fallback_credit and iterations when a fallback-credit token or fallback chain was used) are cumulative and optional.

Constructors

new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

cache_creation_input_tokens
Source
cache_read_input_tokens
Source
fallback_credit

Outcome of the fallback_credit_token presented on this request.

Source
input_tokens
Source
iterations

Per-hop usage when a fallback chain ran (streaming terminal delta).

Source
output_tokens

Number of output tokens generated

Source
output_tokens_details

Breakdown of output tokens by type (e.g. thinking)

Source
server_tool_use
Source