Class ImageGenerateParams.Body.Builder
-
- All Implemented Interfaces:
public final class ImageGenerateParams.Body.Builder
A builder for Body.
-
-
Method Summary
-
-
Method Detail
-
prompt
final ImageGenerateParams.Body.Builder prompt(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
.
-
prompt
final ImageGenerateParams.Body.Builder prompt(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 ImageGenerateParams.Body.Builder model(ImageModel model)
The model to use for image generation.
-
model
final ImageGenerateParams.Body.Builder model(Optional<ImageModel> model)
The model to use for image generation.
-
model
final ImageGenerateParams.Body.Builder model(JsonField<ImageModel> model)
The model to use for image generation.
-
model
final ImageGenerateParams.Body.Builder model(String value)
The model to use for image generation.
-
n
final ImageGenerateParams.Body.Builder n(Long n)
The number of images to generate. Must be between 1 and 10. For
dall-e-3
, onlyn=1
is supported.
-
n
final ImageGenerateParams.Body.Builder n(Long n)
The number of images to generate. Must be between 1 and 10. For
dall-e-3
, onlyn=1
is supported.
-
n
final ImageGenerateParams.Body.Builder n(Optional<Long> n)
The number of images to generate. Must be between 1 and 10. For
dall-e-3
, onlyn=1
is supported.
-
n
final ImageGenerateParams.Body.Builder n(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 ImageGenerateParams.Body.Builder quality(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
.
-
quality
final ImageGenerateParams.Body.Builder quality(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 ImageGenerateParams.Body.Builder responseFormat(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.
-
responseFormat
final ImageGenerateParams.Body.Builder responseFormat(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.
-
responseFormat
final ImageGenerateParams.Body.Builder responseFormat(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 ImageGenerateParams.Body.Builder size(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.
-
size
final ImageGenerateParams.Body.Builder size(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.
-
size
final ImageGenerateParams.Body.Builder size(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 ImageGenerateParams.Body.Builder style(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
.
-
style
final ImageGenerateParams.Body.Builder style(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
.
-
style
final ImageGenerateParams.Body.Builder style(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 ImageGenerateParams.Body.Builder user(String user)
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
-
user
final ImageGenerateParams.Body.Builder user(JsonField<String> user)
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
-
additionalProperties
final ImageGenerateParams.Body.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final ImageGenerateParams.Body.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ImageGenerateParams.Body.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ImageGenerateParams.Body.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ImageGenerateParams.Body.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ImageGenerateParams.Body build()
-
-
-
-