LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDK
Language
Theme
PythonlangsmithschemasInputTokenDetails
Class●Since v0.1

InputTokenDetails

Copy
InputTokenDetails()

Bases

TypedDict

Constructors

Attributes

View source on GitHub
constructor
__init__
NameType
audioint
cache_creationint
cache_readint
cache_read_over_200kint
ephemeral_5m_input_tokensint
ephemeral_1h_input_tokensint
attribute
audio: int

Audio input tokens.

attribute
cache_creation: int

Input tokens that were cached and there was a cache miss.

Since there was a cache miss, the cache was created from these tokens.

attribute
cache_read: int

Input tokens that were cached and there was a cache hit. Since there was a cache hit, the tokens were read from the cache. More precisely, the model state given these tokens was read from the cache.

attribute
cache_read_over_200k: int

Input tokens that were cached and there was a cache hit over 200k. Part of Gemini pricing.

attribute
ephemeral_5m_input_tokens: int

Input tokens used to create a 5-minute ephemeral cache entry (Anthropic).

attribute
ephemeral_1h_input_tokens: int

Input tokens used to create a 1-hour ephemeral cache entry (Anthropic).

Breakdown of input token counts.

Does not need to sum to full input token count. Does not need to have all keys.