AnthropicUsage

data class AnthropicUsage(val inputTokens: Int? = null, val outputTokens: Int? = null, val cacheReadInputTokens: Int? = null, val cacheCreationInputTokens: Int? = null)(source)

Represents the usage statistics of the Anthropic LLM API.

Constructors

Link copied to clipboard
constructor(inputTokens: Int? = null, outputTokens: Int? = null, cacheReadInputTokens: Int? = null, cacheCreationInputTokens: Int? = null)

Properties

Link copied to clipboard

The number of tokens written to the prompt cache. Present when prompt caching is used and a new cache entry was created.

Link copied to clipboard

The number of tokens read from the prompt cache. Present when prompt caching is used and an existing cache entry was hit.

Link copied to clipboard

The number of tokens sent as input to the LLM. Optional in streaming responses.

Link copied to clipboard

The number of tokens received as output from the LLM. Optional in streaming responses.