LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
    • Overview
    • Caches
    • Callbacks
    • Documents
    • Document loaders
    • Embeddings
    • Exceptions
    • Language models
    • Serialization
    • Output parsers
    • Prompts
    • Rate limiters
    • Retrievers
    • Runnables
    • Utilities
    • Vector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    OverviewCachesCallbacksDocumentsDocument loadersEmbeddingsExceptionsLanguage modelsSerializationOutput parsersPromptsRate limitersRetrieversRunnablesUtilitiesVector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    Language
    Theme
    Pythonlangchain-coremessagesaiOutputTokenDetails
    Classā—Since v0.3

    OutputTokenDetails

    Copy
    OutputTokenDetails()

    Bases

    TypedDict

    Constructors

    Attributes

    View source on GitHub
    constructor
    __init__
    NameType
    audioint
    reasoningint
    attribute
    audio: int

    Audio output tokens.

    attribute
    reasoning: int

    Reasoning output tokens.

    Tokens generated by the model in a chain of thought process (i.e. by OpenAI's o1 models) that are not returned as part of model output.

    Breakdown of output token counts.

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

    Example:

    {
        "audio": 10,
        "reasoning": 200,
    }

    May also hold extra provider-specific keys.