Class ApiChatCompletionsResponseUsageCompletionTokenDetails


  • public final class ApiChatCompletionsResponseUsageCompletionTokenDetails
    extends Object
    Breakdown of tokens used in a completion.
    Since:
    8.5.0
    • Method Detail

      • acceptedPredictionTokens

        public Long acceptedPredictionTokens()
        When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion.
        Returns:
        The number of accepted prediction tokens.
      • audioTokens

        public Long audioTokens()
        Audio input tokens generated by the model.
        Returns:
        The number of audio tokens.
      • reasoningTokens

        public Long reasoningTokens()
        Tokens generated by the model for reasoning.
        Returns:
        The number of reasoning tokens.
      • rejectedPredictionTokens

        public Long rejectedPredictionTokens()
        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.
        Returns:
        The number of rejected prediction tokens.