beta_message_delta_usage.py — anthropic-sdk-python Source File
Architecture documentation for beta_message_delta_usage.py, a python file in the anthropic-sdk-python codebase. 5 imports, 2 dependents.
Entity Profile
Dependency Diagram
graph LR 97dd8438_3d35_5356_8fdc_49ec321a6e2b["beta_message_delta_usage.py"] c14e2467_291d_6c7c_2b25_9a24e81f8565["_models"] 97dd8438_3d35_5356_8fdc_49ec321a6e2b --> c14e2467_291d_6c7c_2b25_9a24e81f8565 fba56da2_5b06_a909_4eed_f4898004d572["beta_iterations_usage.py"] 97dd8438_3d35_5356_8fdc_49ec321a6e2b --> fba56da2_5b06_a909_4eed_f4898004d572 2a240ea1_c2a5_d85d_04ad_bd6cc577d381["beta_server_tool_usage.py"] 97dd8438_3d35_5356_8fdc_49ec321a6e2b --> 2a240ea1_c2a5_d85d_04ad_bd6cc577d381 87f0ec79_c29f_61c0_751a_1582c7085768["BetaServerToolUsage"] 97dd8438_3d35_5356_8fdc_49ec321a6e2b --> 87f0ec79_c29f_61c0_751a_1582c7085768 89ddcdd7_3ae1_4c7b_41bb_9f1e25f16875["typing"] 97dd8438_3d35_5356_8fdc_49ec321a6e2b --> 89ddcdd7_3ae1_4c7b_41bb_9f1e25f16875 65f3d77c_c1b2_82e1_f9d7_1e7e05f3fdfd["__init__.py"] 65f3d77c_c1b2_82e1_f9d7_1e7e05f3fdfd --> 97dd8438_3d35_5356_8fdc_49ec321a6e2b 339f07e3_2bd0_16c7_42fe_8e14d08926ee["beta_raw_message_delta_event.py"] 339f07e3_2bd0_16c7_42fe_8e14d08926ee --> 97dd8438_3d35_5356_8fdc_49ec321a6e2b style 97dd8438_3d35_5356_8fdc_49ec321a6e2b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Optional
from ..._models import BaseModel
from .beta_iterations_usage import BetaIterationsUsage
from .beta_server_tool_usage import BetaServerToolUsage
__all__ = ["BetaMessageDeltaUsage"]
class BetaMessageDeltaUsage(BaseModel):
cache_creation_input_tokens: Optional[int] = None
"""The cumulative number of input tokens used to create the cache entry."""
cache_read_input_tokens: Optional[int] = None
"""The cumulative number of input tokens read from the cache."""
input_tokens: Optional[int] = None
"""The cumulative number of input tokens which were used."""
iterations: Optional[BetaIterationsUsage] = None
"""Per-iteration token usage breakdown.
Each entry represents one sampling iteration, with its own input/output token
counts and cache statistics. This allows you to:
- Determine which iterations exceeded long context thresholds (>=200k tokens)
- Calculate the true context window size from the last iteration
- Understand token accumulation across server-side tool use loops
"""
output_tokens: int
"""The cumulative number of output tokens which were used."""
server_tool_use: Optional[BetaServerToolUsage] = None
"""The number of server tool requests."""
Domain
Classes
Dependencies
Imported By
Source
Frequently Asked Questions
What does beta_message_delta_usage.py do?
beta_message_delta_usage.py is a source file in the anthropic-sdk-python codebase, written in python. It belongs to the AnthropicClient domain.
What does beta_message_delta_usage.py depend on?
beta_message_delta_usage.py imports 5 module(s): BetaServerToolUsage, _models, beta_iterations_usage.py, beta_server_tool_usage.py, typing.
What files import beta_message_delta_usage.py?
beta_message_delta_usage.py is imported by 2 file(s): __init__.py, beta_raw_message_delta_event.py.
Where is beta_message_delta_usage.py in the architecture?
beta_message_delta_usage.py is located at src/anthropic/types/beta/beta_message_delta_usage.py (domain: AnthropicClient, directory: src/anthropic/types/beta).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free