PromptTokensDetails - Go SDK

PromptTokensDetails type definition

The Go SDK and docs are currently in beta. Report issues on GitHub.

Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included.

Fields

FieldTypeRequiredDescriptionExample
AudioTokens*int64Number of audio tokens in the input
FileTokens*int64Number of file/document tokens in the input
ImageTokens*int64Number of image tokens in the input258
TextTokens*int64Number of text tokens in the input8
VideoTokens*int64Number of video tokens in the input