class

OpenAI::ImagesUsage

Inherits JSON::Serializable < Reference < Object

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

Constructors

new(total_tokens : Int64 = 0, input_tokens : Int64 = 0, output_tokens : Int64 = 0, input_tokens_details : ImagesUsageInputTokensDetails = ImagesUsageInputTokensDetails.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

The input tokens detailed information for the image generation.

Source
input_tokens_details=(input_tokens_details : ImagesUsageInputTokensDetails)

The input tokens detailed information for the image generation.

Source
output_tokens

The number of image tokens in the output image.

Source
output_tokens=(output_tokens : Int64)

The number of image tokens in the output image.

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