Definition
Fields
integer
required
Number of tokens in the input/prompt.
integer
required
Number of tokens in the output/completion.
integer
required
Total tokens used (
prompt_tokens + completion_tokens).Example
Automatic Capture
RDK automatically captures token usage from LLM providers:Provider Support
Cost Estimation
Use token counts to estimate costs:JSON Serialization
See Also
- Span - Contains token usage

