class

OpenAI::ImageGenUsage

Inherits JSON::Serializable < Reference < Object

For gpt-image-1 only, the token usage information for the image generation.

Constructors

new(input_tokens : Int64 = 0, total_tokens : Int64 = 0, output_tokens : Int64 = 0, input_tokens_details : ImageGenInputUsageDetails = ImageGenInputUsageDetails.new)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

input_tokens

The number of tokens (images and text) in the input prompt.

Source
input_tokens=(input_tokens : Int64)

The number of tokens (images and text) in the input prompt.

Source
input_tokens_details
Source
input_tokens_details=(input_tokens_details : ImageGenInputUsageDetails)
Source
output_tokens

The number of output tokens generated by the model.

Source
output_tokens=(output_tokens : Int64)

The number of output tokens generated by the model.

Source
total_tokens

The total number of tokens (images and text) used for the image generation.

Source
total_tokens=(total_tokens : Int64)

The total number of tokens (images and text) used for the image generation.

Source