CompletionTokensDetails

class CompletionTokensDetails(val acceptedPredictionTokens: Int? = null, val audioTokens: Int? = null, val reasoningTokens: Int? = null, val rejectedPredictionTokens: Int? = null)(source)

Constructors

Link copied to clipboard
constructor(acceptedPredictionTokens: Int? = null, audioTokens: Int? = null, reasoningTokens: Int? = null, rejectedPredictionTokens: Int? = null)

Properties

Link copied to clipboard

When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion.

Link copied to clipboard
val audioTokens: Int? = null

Audio input tokens generated by the model.

Link copied to clipboard
val reasoningTokens: Int? = null

Tokens generated by the model for reasoning.

Link copied to clipboard

When using Predicted Outputs, the number of tokens in the prediction that did not appear in the completion. However, like reasoning tokens, these tokens are still counted in the total completion tokens for purposes of billing, output and context window limits.