Response Usage
@Serializable
Token usage statistics of a ModelResponse.
The Responses API counts tokens under different names than /chat/completions: input and output rather than prompt and completion, with the cache hit reported inside inputTokensDetails instead of as a sibling field.
Constructors
Link copied to clipboard
constructor(inputTokens: Int, inputTokensDetails: InputTokensDetails? = null, outputTokens: Int, outputTokensDetails: OutputTokensDetails? = null, totalTokens: Int)
Properties
Link copied to clipboard
Number of input tokens.
Link copied to clipboard
Breakdown of inputTokens, in particular the context cache hit.
Link copied to clipboard
Number of output tokens, reasoning tokens included.
Link copied to clipboard
Breakdown of outputTokens, in particular the reasoning tokens.
Link copied to clipboard
Total tokens billed for the request (inputTokens + outputTokens).