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.Background
The background parameter used for the image generation. Either
transparent
oropaque
.public final class
ImagesResponse.OutputFormat
The output format of the image generation. Either
png
,webp
, orjpeg
.public final class
ImagesResponse.Quality
The quality of the image generated. Either
low
,medium
, orhigh
.public final class
ImagesResponse.Size
The size of the image generated. Either
1024x1024
,1024x1536
, or1536x1024
.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<ImagesResponse.Background>
background()
The background parameter used for the image generation. final Optional<List<Image>>
data()
The list of generated images. final Optional<ImagesResponse.OutputFormat>
outputFormat()
The output format of the image generation. final Optional<ImagesResponse.Quality>
quality()
The quality of the image generated. final Optional<ImagesResponse.Size>
size()
The size of the image generated. 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<ImagesResponse.Background>
_background()
Returns the raw JSON value of background. final JsonField<List<Image>>
_data()
Returns the raw JSON value of data. final JsonField<ImagesResponse.OutputFormat>
_outputFormat()
Returns the raw JSON value of outputFormat. final JsonField<ImagesResponse.Quality>
_quality()
Returns the raw JSON value of quality. final JsonField<ImagesResponse.Size>
_size()
Returns the raw JSON value of size. 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
-
background
final Optional<ImagesResponse.Background> background()
The background parameter used for the image generation. Either
transparent
oropaque
.
-
outputFormat
final Optional<ImagesResponse.OutputFormat> outputFormat()
The output format of the image generation. Either
png
,webp
, orjpeg
.
-
quality
final Optional<ImagesResponse.Quality> quality()
The quality of the image generated. Either
low
,medium
, orhigh
.
-
size
final Optional<ImagesResponse.Size> size()
The size of the image generated. Either
1024x1024
,1024x1536
, or1536x1024
.
-
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.
-
_background
final JsonField<ImagesResponse.Background> _background()
Returns the raw JSON value of background.
Unlike background, 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.
-
_outputFormat
final JsonField<ImagesResponse.OutputFormat> _outputFormat()
Returns the raw JSON value of outputFormat.
Unlike outputFormat, this method doesn't throw if the JSON field has an unexpected type.
-
_quality
final JsonField<ImagesResponse.Quality> _quality()
Returns the raw JSON value of quality.
Unlike quality, this method doesn't throw if the JSON field has an unexpected type.
-
_size
final JsonField<ImagesResponse.Size> _size()
Returns the raw JSON value of size.
Unlike size, 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()
-
-
-
-