The total number of tokens used by the most recent request and response.
This value includes both the input tokens associated with the prompt and conversation history, and the output tokens generated by the model.
Token usage is reported by the provider when available. Some providers or locally hosted models may not return precise token usage information, particularly when using older models or third-party inference servers. In those cases, the values returned by this property may be estimated or unavailable.
Tokens do not directly correspond to characters or words, but as a general approximation, one token represents about 3-4 English characters. The exact number of tokens depends on the language, formatting, and content being processed.