OpenAI::BatchUsage
Inherits JSON::Serializable < Reference < Object
Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used. Only populated on batches created after September 7, 2025.
Constructors
new(pull : JSON::PullParser)
Sourcenew(input_tokens : Int64 = 0, input_tokens_details : BatchUsageInputTokensDetails = BatchUsageInputTokensDetails.new, output_tokens : Int64 = 0, output_tokens_details : BatchUsageOutputTokensDetails = BatchUsageOutputTokensDetails.new, total_tokens : Int64 = 0)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
input_tokens_details=(input_tokens_details : BatchUsageInputTokensDetails)
A detailed breakdown of the input tokens.
output_tokens_details=(output_tokens_details : BatchUsageOutputTokensDetails)
A detailed breakdown of the output tokens.