Class ImageEditParams.Body
-
- All Implemented Interfaces:
public final class ImageEditParams.Body
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ImageEditParams.Body.Builder
A builder for Body.
-
Method Summary
Modifier and Type Method Description final ByteArray
image()
The image to edit. final String
prompt()
A text description of the desired image(s). final Optional<ByteArray>
mask()
An additional image whose fully transparent areas (e.g. final Optional<ImageModel>
model()
The model to use for image generation. final Optional<Long>
n()
The number of images to generate. final Optional<ImageEditParams.ResponseFormat>
responseFormat()
The format in which the generated images are returned. final Optional<ImageEditParams.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<ByteArray>
_image()
The image to edit. final MultipartField<String>
_prompt()
A text description of the desired image(s). final MultipartField<ByteArray>
_mask()
An additional image whose fully transparent areas (e.g. final MultipartField<ImageModel>
_model()
The model to use for image generation. final MultipartField<Long>
_n()
The number of images to generate. final MultipartField<ImageEditParams.ResponseFormat>
_responseFormat()
The format in which the generated images are returned. final MultipartField<ImageEditParams.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 ImageEditParams.Body
validate()
final ImageEditParams.Body.Builder
toBuilder()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ImageEditParams.Body.Builder
builder()
Returns a mutable builder for constructing an instance of Body. -
-
Method Detail
-
image
final ByteArray image()
The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.
-
prompt
final String prompt()
A text description of the desired image(s). The maximum length is 1000 characters.
-
mask
final Optional<ByteArray> mask()
An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where
image
should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions asimage
.
-
model
final Optional<ImageModel> model()
The model to use for image generation. Only
dall-e-2
is supported at this time.
-
responseFormat
final Optional<ImageEditParams.ResponseFormat> responseFormat()
The format in which the generated images are returned. Must be one of
url
orb64_json
. URLs are only valid for 60 minutes after the image has been generated.
-
size
final Optional<ImageEditParams.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<ByteArray> _image()
The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.
-
_prompt
final MultipartField<String> _prompt()
A text description of the desired image(s). The maximum length is 1000 characters.
-
_mask
final MultipartField<ByteArray> _mask()
An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where
image
should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions asimage
.
-
_model
final MultipartField<ImageModel> _model()
The model to use for image generation. Only
dall-e-2
is supported at this time.
-
_n
final MultipartField<Long> _n()
The number of images to generate. Must be between 1 and 10.
-
_responseFormat
final MultipartField<ImageEditParams.ResponseFormat> _responseFormat()
The format in which the generated images are returned. Must be one of
url
orb64_json
. URLs are only valid for 60 minutes after the image has been generated.
-
_size
final MultipartField<ImageEditParams.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 ImageEditParams.Body validate()
-
toBuilder
final ImageEditParams.Body.Builder toBuilder()
-
builder
final static ImageEditParams.Body.Builder builder()
Returns a mutable builder for constructing an instance of Body.
The following fields are required:
.image() .prompt()
-
-
-
-