Class ImageCreateVariationParams.Body
-
- All Implemented Interfaces:
public final class ImageCreateVariationParams.Body
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classImageCreateVariationParams.Body.BuilderA builder for Body.
-
Method Summary
Modifier and Type Method Description final InputStreamimage()The image to use as the basis for the variation(s). final Optional<ImageModel>model()The model to use for image generation. final Optional<Long>n()The number of images to generate. final Optional<ImageCreateVariationParams.ResponseFormat>responseFormat()The format in which the generated images are returned. final Optional<ImageCreateVariationParams.Size>size()The size of the generated images. final Optional<String>user()A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. final MultipartField<InputStream>_image()The image to use as the basis for the variation(s). final MultipartField<ImageModel>_model()The model to use for image generation. final MultipartField<Long>_n()The number of images to generate. final MultipartField<ImageCreateVariationParams.ResponseFormat>_responseFormat()The format in which the generated images are returned. final MultipartField<ImageCreateVariationParams.Size>_size()The size of the generated images. final MultipartField<String>_user()A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. final ImageCreateVariationParams.Bodyvalidate()final ImageCreateVariationParams.Body.BuildertoBuilder()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ImageCreateVariationParams.Body.Builderbuilder()Returns a mutable builder for constructing an instance of Body. -
-
Method Detail
-
image
final InputStream image()
The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
-
model
final Optional<ImageModel> model()
The model to use for image generation. Only
dall-e-2is supported at this time.
-
n
final Optional<Long> n()
The number of images to generate. Must be between 1 and 10. For
dall-e-3, onlyn=1is supported.
-
responseFormat
final Optional<ImageCreateVariationParams.ResponseFormat> responseFormat()
The format in which the generated images are returned. Must be one of
urlorb64_json. URLs are only valid for 60 minutes after the image has been generated.
-
size
final Optional<ImageCreateVariationParams.Size> size()
The size of the generated images. Must be one of
256x256,512x512, or1024x1024.
-
user
final Optional<String> user()
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
-
_image
final MultipartField<InputStream> _image()
The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
-
_model
final MultipartField<ImageModel> _model()
The model to use for image generation. Only
dall-e-2is supported at this time.
-
_n
final MultipartField<Long> _n()
The number of images to generate. Must be between 1 and 10. For
dall-e-3, onlyn=1is supported.
-
_responseFormat
final MultipartField<ImageCreateVariationParams.ResponseFormat> _responseFormat()
The format in which the generated images are returned. Must be one of
urlorb64_json. URLs are only valid for 60 minutes after the image has been generated.
-
_size
final MultipartField<ImageCreateVariationParams.Size> _size()
The size of the generated images. Must be one of
256x256,512x512, or1024x1024.
-
_user
final MultipartField<String> _user()
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
-
validate
final ImageCreateVariationParams.Body validate()
-
toBuilder
final ImageCreateVariationParams.Body.Builder toBuilder()
-
builder
final static ImageCreateVariationParams.Body.Builder builder()
Returns a mutable builder for constructing an instance of Body.
The following fields are required:
.image()
-
-
-
-