Class Tool.ImageGeneration.Builder
-
- All Implemented Interfaces:
public final class Tool.ImageGeneration.Builder
A builder for ImageGeneration.
-
-
Method Summary
-
-
Method Detail
-
type
final Tool.ImageGeneration.Builder type(JsonValue type)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("image_generation")
This method is primarily for setting the field to an undocumented or not yet supported value.
-
background
final Tool.ImageGeneration.Builder background(Tool.ImageGeneration.Background background)
Background type for the generated image. One of
transparent
,opaque
, orauto
. Default:auto
.
-
background
final Tool.ImageGeneration.Builder background(JsonField<Tool.ImageGeneration.Background> background)
Sets Builder.background to an arbitrary JSON value.
You should usually call Builder.background with a well-typed Background value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
inputImageMask
final Tool.ImageGeneration.Builder inputImageMask(Tool.ImageGeneration.InputImageMask inputImageMask)
Optional mask for inpainting. Contains
image_url
(string, optional) andfile_id
(string, optional).
-
inputImageMask
final Tool.ImageGeneration.Builder inputImageMask(JsonField<Tool.ImageGeneration.InputImageMask> inputImageMask)
Sets Builder.inputImageMask to an arbitrary JSON value.
You should usually call Builder.inputImageMask with a well-typed InputImageMask value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
model
final Tool.ImageGeneration.Builder model(Tool.ImageGeneration.Model model)
The image generation model to use. Default:
gpt-image-1
.
-
model
final Tool.ImageGeneration.Builder model(JsonField<Tool.ImageGeneration.Model> model)
Sets Builder.model to an arbitrary JSON value.
You should usually call Builder.model with a well-typed Model value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
moderation
final Tool.ImageGeneration.Builder moderation(Tool.ImageGeneration.Moderation moderation)
Moderation level for the generated image. Default:
auto
.
-
moderation
final Tool.ImageGeneration.Builder moderation(JsonField<Tool.ImageGeneration.Moderation> moderation)
Sets Builder.moderation to an arbitrary JSON value.
You should usually call Builder.moderation with a well-typed Moderation value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
outputCompression
final Tool.ImageGeneration.Builder outputCompression(Long outputCompression)
Compression level for the output image. Default: 100.
-
outputCompression
final Tool.ImageGeneration.Builder outputCompression(JsonField<Long> outputCompression)
Sets Builder.outputCompression to an arbitrary JSON value.
You should usually call Builder.outputCompression with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
outputFormat
final Tool.ImageGeneration.Builder outputFormat(Tool.ImageGeneration.OutputFormat outputFormat)
The output format of the generated image. One of
png
,webp
, orjpeg
. Default:png
.
-
outputFormat
final Tool.ImageGeneration.Builder outputFormat(JsonField<Tool.ImageGeneration.OutputFormat> outputFormat)
Sets Builder.outputFormat to an arbitrary JSON value.
You should usually call Builder.outputFormat with a well-typed OutputFormat value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
partialImages
final Tool.ImageGeneration.Builder partialImages(Long partialImages)
Number of partial images to generate in streaming mode, from 0 (default value) to 3.
-
partialImages
final Tool.ImageGeneration.Builder partialImages(JsonField<Long> partialImages)
Sets Builder.partialImages to an arbitrary JSON value.
You should usually call Builder.partialImages with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
quality
final Tool.ImageGeneration.Builder quality(Tool.ImageGeneration.Quality quality)
The quality of the generated image. One of
low
,medium
,high
, orauto
. Default:auto
.
-
quality
final Tool.ImageGeneration.Builder quality(JsonField<Tool.ImageGeneration.Quality> quality)
Sets Builder.quality to an arbitrary JSON value.
You should usually call Builder.quality with a well-typed Quality value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
size
final Tool.ImageGeneration.Builder size(Tool.ImageGeneration.Size size)
The size of the generated image. One of
1024x1024
,1024x1536
,1536x1024
, orauto
. Default:auto
.
-
size
final Tool.ImageGeneration.Builder size(JsonField<Tool.ImageGeneration.Size> size)
Sets Builder.size to an arbitrary JSON value.
You should usually call Builder.size with a well-typed Size value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final Tool.ImageGeneration.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final Tool.ImageGeneration.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final Tool.ImageGeneration.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final Tool.ImageGeneration.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final Tool.ImageGeneration.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final Tool.ImageGeneration build()
Returns an immutable instance of ImageGeneration.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-