Class ImageGenerateParams
-
- All Implemented Interfaces:
-
com.openai.core.Params
public final class ImageGenerateParams implements Params
Creates an image given a prompt.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ImageGenerateParams.ImageGenerateBody
public final class
ImageGenerateParams.Builder
A builder for ImageGenerateParams.
public final class
ImageGenerateParams.Quality
The quality of the image that will be generated.
hd
creates images with finer details and greater consistency across the image. This param is only supported fordall-e-3
.public final class
ImageGenerateParams.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.public final class
ImageGenerateParams.Size
The size of the generated images. Must be one of
256x256
,512x512
, or1024x1024
fordall-e-2
. Must be one of1024x1024
,1792x1024
, or1024x1792
fordall-e-3
models.public final class
ImageGenerateParams.Style
The style of the generated images. Must be one of
vivid
ornatural
. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported fordall-e-3
.
-
Method Summary
Modifier and Type Method Description final String
prompt()
A text description of the desired image(s). final Optional<ImageModel>
model()
The model to use for image generation. final Optional<Long>
n()
The number of images to generate. final Optional<ImageGenerateParams.Quality>
quality()
The quality of the image that will be generated. final Optional<ImageGenerateParams.ResponseFormat>
responseFormat()
The format in which the generated images are returned. final Optional<ImageGenerateParams.Size>
size()
The size of the generated images. final Optional<ImageGenerateParams.Style>
style()
The style 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 JsonField<String>
_prompt()
A text description of the desired image(s). final JsonField<ImageModel>
_model()
The model to use for image generation. final JsonField<Long>
_n()
The number of images to generate. final JsonField<ImageGenerateParams.Quality>
_quality()
The quality of the image that will be generated. final JsonField<ImageGenerateParams.ResponseFormat>
_responseFormat()
The format in which the generated images are returned. final JsonField<ImageGenerateParams.Size>
_size()
The size of the generated images. final JsonField<ImageGenerateParams.Style>
_style()
The style of the generated images. final JsonField<String>
_user()
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. final Map<String, JsonValue>
_additionalBodyProperties()
final Headers
_additionalHeaders()
final QueryParams
_additionalQueryParams()
Headers
_headers()
The full set of headers in the parameters, including both fixed and additional headers. QueryParams
_queryParams()
The full set of query params in the parameters, including both fixed and additional query params. final ImageGenerateParams.Builder
toBuilder()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ImageGenerateParams.Builder
builder()
-
-
Method Detail
-
prompt
final String prompt()
A text description of the desired image(s). The maximum length is 1000 characters for
dall-e-2
and 4000 characters fordall-e-3
.
-
model
final Optional<ImageModel> model()
The model to use for image generation.
-
n
final Optional<Long> n()
The number of images to generate. Must be between 1 and 10. For
dall-e-3
, onlyn=1
is supported.
-
quality
final Optional<ImageGenerateParams.Quality> quality()
The quality of the image that will be generated.
hd
creates images with finer details and greater consistency across the image. This param is only supported fordall-e-3
.
-
responseFormat
final Optional<ImageGenerateParams.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<ImageGenerateParams.Size> size()
The size of the generated images. Must be one of
256x256
,512x512
, or1024x1024
fordall-e-2
. Must be one of1024x1024
,1792x1024
, or1024x1792
fordall-e-3
models.
-
style
final Optional<ImageGenerateParams.Style> style()
The style of the generated images. Must be one of
vivid
ornatural
. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported fordall-e-3
.
-
user
final Optional<String> user()
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
-
_prompt
final JsonField<String> _prompt()
A text description of the desired image(s). The maximum length is 1000 characters for
dall-e-2
and 4000 characters fordall-e-3
.
-
_model
final JsonField<ImageModel> _model()
The model to use for image generation.
-
_n
final JsonField<Long> _n()
The number of images to generate. Must be between 1 and 10. For
dall-e-3
, onlyn=1
is supported.
-
_quality
final JsonField<ImageGenerateParams.Quality> _quality()
The quality of the image that will be generated.
hd
creates images with finer details and greater consistency across the image. This param is only supported fordall-e-3
.
-
_responseFormat
final JsonField<ImageGenerateParams.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 JsonField<ImageGenerateParams.Size> _size()
The size of the generated images. Must be one of
256x256
,512x512
, or1024x1024
fordall-e-2
. Must be one of1024x1024
,1792x1024
, or1024x1792
fordall-e-3
models.
-
_style
final JsonField<ImageGenerateParams.Style> _style()
The style of the generated images. Must be one of
vivid
ornatural
. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported fordall-e-3
.
-
_user
final JsonField<String> _user()
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
-
_additionalBodyProperties
final Map<String, JsonValue> _additionalBodyProperties()
-
_additionalHeaders
final Headers _additionalHeaders()
-
_additionalQueryParams
final QueryParams _additionalQueryParams()
-
_headers
Headers _headers()
The full set of headers in the parameters, including both fixed and additional headers.
-
_queryParams
QueryParams _queryParams()
The full set of query params in the parameters, including both fixed and additional query params.
-
toBuilder
final ImageGenerateParams.Builder toBuilder()
-
builder
final static ImageGenerateParams.Builder builder()
-
-
-
-