Package com.openai.models.images
Class ImagesResponse
-
- All Implemented Interfaces:
public final class ImagesResponse
The response from the image generation endpoint.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ImagesResponse.Builder
A builder for ImagesResponse.
public final class
ImagesResponse.Usage
For
gpt-image-1
only, the token usage information for the image generation.
-
Method Summary
Modifier and Type Method Description final Long
created()
The Unix timestamp (in seconds) of when the image was created. final Optional<List<Image>>
data()
The list of generated images. final Optional<ImagesResponse.Usage>
usage()
For gpt-image-1
only, the token usage information for the image generation.final JsonField<Long>
_created()
Returns the raw JSON value of created. final JsonField<List<Image>>
_data()
Returns the raw JSON value of data. final JsonField<ImagesResponse.Usage>
_usage()
Returns the raw JSON value of usage. final Map<String, JsonValue>
_additionalProperties()
final ImagesResponse.Builder
toBuilder()
final ImagesResponse
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ImagesResponse.Builder
builder()
Returns a mutable builder for constructing an instance of ImagesResponse. -
-
Method Detail
-
usage
final Optional<ImagesResponse.Usage> usage()
For
gpt-image-1
only, the token usage information for the image generation.
-
_created
final JsonField<Long> _created()
Returns the raw JSON value of created.
Unlike created, this method doesn't throw if the JSON field has an unexpected type.
-
_data
final JsonField<List<Image>> _data()
Returns the raw JSON value of data.
Unlike data, this method doesn't throw if the JSON field has an unexpected type.
-
_usage
final JsonField<ImagesResponse.Usage> _usage()
Returns the raw JSON value of usage.
Unlike usage, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ImagesResponse.Builder toBuilder()
-
validate
final ImagesResponse validate()
-
builder
final static ImagesResponse.Builder builder()
Returns a mutable builder for constructing an instance of ImagesResponse.
The following fields are required:
.created()
-
-
-
-