struct

AI::Provider::ImageModel::Usage

Inherits JSON::Serializable < Struct < Value < Object

Usage information for an image model call.

Constructors

new(input_tokens : Int32 | Nil = nil, output_tokens : Int32 | Nil = nil, total_tokens : Int32 | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

input_tokens

The number of input (prompt) tokens used.

Source
output_tokens

The number of output tokens used, if reported by the provider.

Source
total_tokens

The total number of tokens as reported by the provider.

Source