Class ImageCreateVariationParams.Body.Builder
- 
                    
                    
- All Implemented Interfaces:
 
public final class ImageCreateVariationParams.Body.BuilderA builder for Body.
 
- 
                
                    
                    
- 
                                
                            
                                
Method Summary
- 
                    
                    
                    
- 
                                
                            
                                
Method Detail
- 
                                        
image
final ImageCreateVariationParams.Body.Builder image(InputStream image)
The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
 
- 
                                        
image
final ImageCreateVariationParams.Body.Builder image(MultipartField<InputStream> image)
Sets Builder.image to an arbitrary multipart value.
You should usually call Builder.image with a well-typed InputStream value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
 
- 
                                        
image
final ImageCreateVariationParams.Body.Builder image(ByteArray image)
The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
 
- 
                                        
image
final ImageCreateVariationParams.Body.Builder image(Path image)
The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
 
- 
                                        
model
final ImageCreateVariationParams.Body.Builder model(ImageModel model)
The model to use for image generation. Only
dall-e-2is supported at this time. 
- 
                                        
model
final ImageCreateVariationParams.Body.Builder model(Optional<ImageModel> model)
Alias for calling Builder.model with
model.orElse(null). 
- 
                                        
model
final ImageCreateVariationParams.Body.Builder model(MultipartField<ImageModel> model)
Sets Builder.model to an arbitrary multipart value.
You should usually call Builder.model with a well-typed ImageModel value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
 
- 
                                        
model
final ImageCreateVariationParams.Body.Builder model(String value)
Sets model to an arbitrary String.
You should usually call model with a well-typed ImageModel constant instead. This method is primarily for setting the field to an undocumented or not yet supported value.
 
- 
                                        
n
final ImageCreateVariationParams.Body.Builder n(Long n)
The number of images to generate. Must be between 1 and 10.
 
- 
                                        
n
final ImageCreateVariationParams.Body.Builder n(Long n)
Alias for Builder.n.
This unboxed primitive overload exists for backwards compatibility.
 
- 
                                        
n
final ImageCreateVariationParams.Body.Builder n(Optional<Long> n)
Alias for calling Builder.n with
n.orElse(null). 
- 
                                        
n
final ImageCreateVariationParams.Body.Builder n(MultipartField<Long> n)
Sets Builder.n to an arbitrary multipart value.
You should usually call Builder.n with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
 
- 
                                        
responseFormat
final ImageCreateVariationParams.Body.Builder responseFormat(ImageCreateVariationParams.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. 
- 
                                        
responseFormat
final ImageCreateVariationParams.Body.Builder responseFormat(Optional<ImageCreateVariationParams.ResponseFormat> responseFormat)
Alias for calling Builder.responseFormat with
responseFormat.orElse(null). 
- 
                                        
responseFormat
final ImageCreateVariationParams.Body.Builder responseFormat(MultipartField<ImageCreateVariationParams.ResponseFormat> responseFormat)
Sets Builder.responseFormat to an arbitrary multipart value.
You should usually call Builder.responseFormat with a well-typed ResponseFormat value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
 
- 
                                        
size
final ImageCreateVariationParams.Body.Builder size(ImageCreateVariationParams.Size size)
The size of the generated images. Must be one of
256x256,512x512, or1024x1024. 
- 
                                        
size
final ImageCreateVariationParams.Body.Builder size(Optional<ImageCreateVariationParams.Size> size)
Alias for calling Builder.size with
size.orElse(null). 
- 
                                        
size
final ImageCreateVariationParams.Body.Builder size(MultipartField<ImageCreateVariationParams.Size> size)
Sets Builder.size to an arbitrary multipart 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.
 
- 
                                        
user
final ImageCreateVariationParams.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 ImageCreateVariationParams.Body.Builder user(MultipartField<String> user)
Sets Builder.user to an arbitrary multipart value.
You should usually call Builder.user with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
 
- 
                                        
additionalProperties
final ImageCreateVariationParams.Body.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
 
- 
                                        
putAdditionalProperty
final ImageCreateVariationParams.Body.Builder putAdditionalProperty(String key, JsonValue value)
 
- 
                                        
putAllAdditionalProperties
final ImageCreateVariationParams.Body.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
 
- 
                                        
removeAdditionalProperty
final ImageCreateVariationParams.Body.Builder removeAdditionalProperty(String key)
 
- 
                                        
removeAllAdditionalProperties
final ImageCreateVariationParams.Body.Builder removeAllAdditionalProperties(Set<String> keys)
 
- 
                                        
build
final ImageCreateVariationParams.Body build()
Returns an immutable instance of Body.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.image() 
 - 
                                        
 
 - 
                                
                            
                                
 
 - 
                    
                    
                    
 
 -