Class ImagesResponse.Usage
-
- All Implemented Interfaces:
public final class ImagesResponse.Usage
For
gpt-image-1
only, the token usage information for the image generation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ImagesResponse.Usage.Builder
A builder for Usage.
public final class
ImagesResponse.Usage.InputTokensDetails
The input tokens detailed information for the image generation.
-
Method Summary
Modifier and Type Method Description final Long
inputTokens()
The number of tokens (images and text) in the input prompt. final ImagesResponse.Usage.InputTokensDetails
inputTokensDetails()
The input tokens detailed information for the image generation. final Long
outputTokens()
The number of image tokens in the output image. final Long
totalTokens()
The total number of tokens (images and text) used for the image generation. final JsonField<Long>
_inputTokens()
Returns the raw JSON value of inputTokens. final JsonField<ImagesResponse.Usage.InputTokensDetails>
_inputTokensDetails()
Returns the raw JSON value of inputTokensDetails. final JsonField<Long>
_outputTokens()
Returns the raw JSON value of outputTokens. final JsonField<Long>
_totalTokens()
Returns the raw JSON value of totalTokens. final Map<String, JsonValue>
_additionalProperties()
final ImagesResponse.Usage.Builder
toBuilder()
final ImagesResponse.Usage
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ImagesResponse.Usage.Builder
builder()
Returns a mutable builder for constructing an instance of Usage. -
-
Method Detail
-
inputTokens
final Long inputTokens()
The number of tokens (images and text) in the input prompt.
-
inputTokensDetails
final ImagesResponse.Usage.InputTokensDetails inputTokensDetails()
The input tokens detailed information for the image generation.
-
outputTokens
final Long outputTokens()
The number of image tokens in the output image.
-
totalTokens
final Long totalTokens()
The total number of tokens (images and text) used for the image generation.
-
_inputTokens
final JsonField<Long> _inputTokens()
Returns the raw JSON value of inputTokens.
Unlike inputTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_inputTokensDetails
final JsonField<ImagesResponse.Usage.InputTokensDetails> _inputTokensDetails()
Returns the raw JSON value of inputTokensDetails.
Unlike inputTokensDetails, this method doesn't throw if the JSON field has an unexpected type.
-
_outputTokens
final JsonField<Long> _outputTokens()
Returns the raw JSON value of outputTokens.
Unlike outputTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_totalTokens
final JsonField<Long> _totalTokens()
Returns the raw JSON value of totalTokens.
Unlike totalTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ImagesResponse.Usage.Builder toBuilder()
-
validate
final ImagesResponse.Usage validate()
-
builder
final static ImagesResponse.Usage.Builder builder()
Returns a mutable builder for constructing an instance of Usage.
The following fields are required:
.inputTokens() .inputTokensDetails() .outputTokens() .totalTokens()
-
-
-
-