Class ImagesResponse
-
- All Implemented Interfaces:
public final class ImagesResponseThe response from the image generation endpoint.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classImagesResponse.BuilderA builder for ImagesResponse.
public final classImagesResponse.BackgroundThe background parameter used for the image generation. Either
transparentoropaque.public final classImagesResponse.OutputFormatThe output format of the image generation. Either
png,webp, orjpeg.public final classImagesResponse.QualityThe quality of the image generated. Either
low,medium, orhigh.public final classImagesResponse.SizeThe size of the image generated. Either
1024x1024,1024x1536, or1536x1024.public final classImagesResponse.UsageFor
gpt-image-1only, the token usage information for the image generation.
-
Method Summary
Modifier and Type Method Description final Longcreated()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-1only, 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.BuildertoBuilder()final ImagesResponsevalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ImagesResponse.Builderbuilder()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
transparentoropaque.
-
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-1only, 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()
-
-
-
-