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 classImageGenerateParams.Bodypublic final classImageGenerateParams.BuilderA builder for ImageGenerateParams.
public final classImageGenerateParams.QualityThe quality of the image that will be generated.
hdcreates images with finer details and greater consistency across the image. This param is only supported fordall-e-3.public final classImageGenerateParams.ResponseFormatThe 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.public final classImageGenerateParams.SizeThe size of the generated images. Must be one of
256x256,512x512, or1024x1024fordall-e-2. Must be one of1024x1024,1792x1024, or1024x1792fordall-e-3models.public final classImageGenerateParams.StyleThe style of the generated images. Must be one of
vividornatural. 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 Stringprompt()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.BuildertoBuilder()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ImageGenerateParams.Builderbuilder()Returns a mutable builder for constructing an instance of ImageGenerateParams. -
-
Method Detail
-
prompt
final String prompt()
A text description of the desired image(s). The maximum length is 1000 characters for
dall-e-2and 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=1is supported.
-
quality
final Optional<ImageGenerateParams.Quality> quality()
The quality of the image that will be generated.
hdcreates 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
urlorb64_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, or1024x1024fordall-e-2. Must be one of1024x1024,1792x1024, or1024x1792fordall-e-3models.
-
style
final Optional<ImageGenerateParams.Style> style()
The style of the generated images. Must be one of
vividornatural. 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-2and 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=1is supported.
-
_quality
final JsonField<ImageGenerateParams.Quality> _quality()
The quality of the image that will be generated.
hdcreates 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
urlorb64_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, or1024x1024fordall-e-2. Must be one of1024x1024,1792x1024, or1024x1792fordall-e-3models.
-
_style
final JsonField<ImageGenerateParams.Style> _style()
The style of the generated images. Must be one of
vividornatural. 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()
Returns a mutable builder for constructing an instance of ImageGenerateParams.
The following fields are required:
.prompt()
-
-
-
-