Skip to main content

OperationTokenUsageDto

Tokens an AI operation consumed, as recorded in the operation metadata. A kind the provider did not report is 0.

NameTypeDescriptionNotes
totalTokensLong (int64)All tokens of the request: prompt plus completion.[optional] [example: 20747]
promptTokensLong (int64)Tokens sent to the model, cached ones included.[optional] [example: 19332]
completionTokensLong (int64)Tokens the model generated, reasoning ones included.[optional] [example: 1415]
cachedTokensLong (int64)Part of the prompt tokens read from the provider cache.[optional] [example: 19226]
cacheWriteTokensLong (int64)Part of the prompt tokens written to the provider cache.[optional] [example: 104]
reasoningTokensLong (int64)Part of the completion tokens the model spent on reasoning.[optional] [example: 68]
imageTokensLong (int64)Tokens spent on images.[optional] [example: 0]