Class ImageGenerateParams.Builder
- 
                    
                    - All Implemented Interfaces:
 
 public final class ImageGenerateParams.BuilderA builder for ImageGenerateParams. 
- 
                
                    
                    - 
                                
                            
                                Method Summary- 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        bodyfinal ImageGenerateParams.Builder body(ImageGenerateParams.Body body) Sets the entire request body. This is generally only useful if you are already constructing the body separately. Otherwise, it's more convenient to use the top-level setters instead: 
 - 
                                        promptfinal ImageGenerateParams.Builder prompt(String prompt) A text description of the desired image(s). The maximum length is 32000 characters for gpt-image-1, 1000 characters fordall-e-2and 4000 characters fordall-e-3.
 - 
                                        promptfinal ImageGenerateParams.Builder prompt(JsonField<String> prompt) Sets Builder.prompt to an arbitrary JSON value. You should usually call Builder.prompt with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        backgroundfinal ImageGenerateParams.Builder background(ImageGenerateParams.Background background) Allows to set transparency for the background of the generated image(s). This parameter is only supported for gpt-image-1. Must be one oftransparent,opaqueorauto(default value). Whenautois used, the model will automatically determine the best background for the image.If transparent, the output format needs to support transparency, so it should be set to eitherpng(default value) orwebp.
 - 
                                        backgroundfinal ImageGenerateParams.Builder background(Optional<ImageGenerateParams.Background> background) Alias for calling Builder.background with background.orElse(null).
 - 
                                        backgroundfinal ImageGenerateParams.Builder background(JsonField<ImageGenerateParams.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. 
 - 
                                        modelfinal ImageGenerateParams.Builder model(ImageModel model) The model to use for image generation. One of dall-e-2,dall-e-3, orgpt-image-1. Defaults todall-e-2unless a parameter specific togpt-image-1is used.
 - 
                                        modelfinal ImageGenerateParams.Builder model(Optional<ImageModel> model) Alias for calling Builder.model with model.orElse(null).
 - 
                                        modelfinal ImageGenerateParams.Builder model(JsonField<ImageModel> model) Sets Builder.model to an arbitrary JSON 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. 
 - 
                                        modelfinal ImageGenerateParams.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. 
 - 
                                        moderationfinal ImageGenerateParams.Builder moderation(ImageGenerateParams.Moderation moderation) Control the content-moderation level for images generated by gpt-image-1. Must be eitherlowfor less restrictive filtering orauto(default value).
 - 
                                        moderationfinal ImageGenerateParams.Builder moderation(Optional<ImageGenerateParams.Moderation> moderation) Alias for calling Builder.moderation with moderation.orElse(null).
 - 
                                        moderationfinal ImageGenerateParams.Builder moderation(JsonField<ImageGenerateParams.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. 
 - 
                                        nfinal ImageGenerateParams.Builder n(Long n) The number of images to generate. Must be between 1 and 10. For dall-e-3, onlyn=1is supported.
 - 
                                        nfinal ImageGenerateParams.Builder n(Long n) Alias for Builder.n. This unboxed primitive overload exists for backwards compatibility. 
 - 
                                        nfinal ImageGenerateParams.Builder n(Optional<Long> n) Alias for calling Builder.n with n.orElse(null).
 - 
                                        nfinal ImageGenerateParams.Builder n(JsonField<Long> n) Sets Builder.n to an arbitrary JSON 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. 
 - 
                                        outputCompressionfinal ImageGenerateParams.Builder outputCompression(Long outputCompression) The compression level (0-100%) for the generated images. This parameter is only supported for gpt-image-1with thewebporjpegoutput formats, and defaults to 100.
 - 
                                        outputCompressionfinal ImageGenerateParams.Builder outputCompression(Long outputCompression) Alias for Builder.outputCompression. This unboxed primitive overload exists for backwards compatibility. 
 - 
                                        outputCompressionfinal ImageGenerateParams.Builder outputCompression(Optional<Long> outputCompression) Alias for calling Builder.outputCompression with outputCompression.orElse(null).
 - 
                                        outputCompressionfinal ImageGenerateParams.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. 
 - 
                                        outputFormatfinal ImageGenerateParams.Builder outputFormat(ImageGenerateParams.OutputFormat outputFormat) The format in which the generated images are returned. This parameter is only supported for gpt-image-1. Must be one ofpng,jpeg, orwebp.
 - 
                                        outputFormatfinal ImageGenerateParams.Builder outputFormat(Optional<ImageGenerateParams.OutputFormat> outputFormat) Alias for calling Builder.outputFormat with outputFormat.orElse(null).
 - 
                                        outputFormatfinal ImageGenerateParams.Builder outputFormat(JsonField<ImageGenerateParams.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. 
 - 
                                        partialImagesfinal ImageGenerateParams.Builder partialImages(Long partialImages) The number of partial images to generate. This parameter is used for streaming responses that return partial images. Value must be between 0 and 3. When set to 0, the response will be a single image sent in one streaming event. Note that the final image may be sent before the full number of partial images are generated if the full image is generated more quickly. 
 - 
                                        partialImagesfinal ImageGenerateParams.Builder partialImages(Long partialImages) Alias for Builder.partialImages. This unboxed primitive overload exists for backwards compatibility. 
 - 
                                        partialImagesfinal ImageGenerateParams.Builder partialImages(Optional<Long> partialImages) Alias for calling Builder.partialImages with partialImages.orElse(null).
 - 
                                        partialImagesfinal ImageGenerateParams.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. 
 - 
                                        qualityfinal ImageGenerateParams.Builder quality(ImageGenerateParams.Quality quality) The quality of the image that will be generated. - auto(default value) will automatically select the best quality for the given model.
- high,- mediumand- loware supported for- gpt-image-1.
- hdand- standardare supported for- dall-e-3.
- standardis the only option for- dall-e-2.
 
 - 
                                        qualityfinal ImageGenerateParams.Builder quality(Optional<ImageGenerateParams.Quality> quality) Alias for calling Builder.quality with quality.orElse(null).
 - 
                                        qualityfinal ImageGenerateParams.Builder quality(JsonField<ImageGenerateParams.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. 
 - 
                                        responseFormatfinal ImageGenerateParams.Builder responseFormat(ImageGenerateParams.ResponseFormat responseFormat) The format in which generated images with dall-e-2anddall-e-3are returned. Must be one ofurlorb64_json. URLs are only valid for 60 minutes after the image has been generated. This parameter isn't supported forgpt-image-1which will always return base64-encoded images.
 - 
                                        responseFormatfinal ImageGenerateParams.Builder responseFormat(Optional<ImageGenerateParams.ResponseFormat> responseFormat) Alias for calling Builder.responseFormat with responseFormat.orElse(null).
 - 
                                        responseFormatfinal ImageGenerateParams.Builder responseFormat(JsonField<ImageGenerateParams.ResponseFormat> responseFormat) Sets Builder.responseFormat to an arbitrary JSON 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. 
 - 
                                        sizefinal ImageGenerateParams.Builder size(ImageGenerateParams.Size size) The size of the generated images. Must be one of 1024x1024,1536x1024(landscape),1024x1536(portrait), orauto(default value) forgpt-image-1, one of256x256,512x512, or1024x1024fordall-e-2, and one of1024x1024,1792x1024, or1024x1792fordall-e-3.
 - 
                                        sizefinal ImageGenerateParams.Builder size(Optional<ImageGenerateParams.Size> size) Alias for calling Builder.size with size.orElse(null).
 - 
                                        sizefinal ImageGenerateParams.Builder size(JsonField<ImageGenerateParams.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. 
 - 
                                        stylefinal ImageGenerateParams.Builder style(ImageGenerateParams.Style style) The style of the generated images. This parameter is only supported for dall-e-3. Must be one ofvividornatural. 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.
 - 
                                        stylefinal ImageGenerateParams.Builder style(Optional<ImageGenerateParams.Style> style) Alias for calling Builder.style with style.orElse(null).
 - 
                                        stylefinal ImageGenerateParams.Builder style(JsonField<ImageGenerateParams.Style> style) Sets Builder.style to an arbitrary JSON value. You should usually call Builder.style with a well-typed Style value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        userfinal ImageGenerateParams.Builder user(String user) A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more. 
 - 
                                        userfinal ImageGenerateParams.Builder user(JsonField<String> user) Sets Builder.user to an arbitrary JSON 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. 
 - 
                                        additionalBodyPropertiesfinal ImageGenerateParams.Builder additionalBodyProperties(Map<String, JsonValue> additionalBodyProperties) 
 - 
                                        putAdditionalBodyPropertyfinal ImageGenerateParams.Builder putAdditionalBodyProperty(String key, JsonValue value) 
 - 
                                        putAllAdditionalBodyPropertiesfinal ImageGenerateParams.Builder putAllAdditionalBodyProperties(Map<String, JsonValue> additionalBodyProperties) 
 - 
                                        removeAdditionalBodyPropertyfinal ImageGenerateParams.Builder removeAdditionalBodyProperty(String key) 
 - 
                                        removeAllAdditionalBodyPropertiesfinal ImageGenerateParams.Builder removeAllAdditionalBodyProperties(Set<String> keys) 
 - 
                                        additionalHeadersfinal ImageGenerateParams.Builder additionalHeaders(Headers additionalHeaders) 
 - 
                                        additionalHeadersfinal ImageGenerateParams.Builder additionalHeaders(Map<String, Iterable<String>> additionalHeaders) 
 - 
                                        putAdditionalHeaderfinal ImageGenerateParams.Builder putAdditionalHeader(String name, String value) 
 - 
                                        putAdditionalHeadersfinal ImageGenerateParams.Builder putAdditionalHeaders(String name, Iterable<String> values) 
 - 
                                        putAllAdditionalHeadersfinal ImageGenerateParams.Builder putAllAdditionalHeaders(Headers additionalHeaders) 
 - 
                                        putAllAdditionalHeadersfinal ImageGenerateParams.Builder putAllAdditionalHeaders(Map<String, Iterable<String>> additionalHeaders) 
 - 
                                        replaceAdditionalHeadersfinal ImageGenerateParams.Builder replaceAdditionalHeaders(String name, String value) 
 - 
                                        replaceAdditionalHeadersfinal ImageGenerateParams.Builder replaceAdditionalHeaders(String name, Iterable<String> values) 
 - 
                                        replaceAllAdditionalHeadersfinal ImageGenerateParams.Builder replaceAllAdditionalHeaders(Headers additionalHeaders) 
 - 
                                        replaceAllAdditionalHeadersfinal ImageGenerateParams.Builder replaceAllAdditionalHeaders(Map<String, Iterable<String>> additionalHeaders) 
 - 
                                        removeAdditionalHeadersfinal ImageGenerateParams.Builder removeAdditionalHeaders(String name) 
 - 
                                        removeAllAdditionalHeadersfinal ImageGenerateParams.Builder removeAllAdditionalHeaders(Set<String> names) 
 - 
                                        additionalQueryParamsfinal ImageGenerateParams.Builder additionalQueryParams(QueryParams additionalQueryParams) 
 - 
                                        additionalQueryParamsfinal ImageGenerateParams.Builder additionalQueryParams(Map<String, Iterable<String>> additionalQueryParams) 
 - 
                                        putAdditionalQueryParamfinal ImageGenerateParams.Builder putAdditionalQueryParam(String key, String value) 
 - 
                                        putAdditionalQueryParamsfinal ImageGenerateParams.Builder putAdditionalQueryParams(String key, Iterable<String> values) 
 - 
                                        putAllAdditionalQueryParamsfinal ImageGenerateParams.Builder putAllAdditionalQueryParams(QueryParams additionalQueryParams) 
 - 
                                        putAllAdditionalQueryParamsfinal ImageGenerateParams.Builder putAllAdditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams) 
 - 
                                        replaceAdditionalQueryParamsfinal ImageGenerateParams.Builder replaceAdditionalQueryParams(String key, String value) 
 - 
                                        replaceAdditionalQueryParamsfinal ImageGenerateParams.Builder replaceAdditionalQueryParams(String key, Iterable<String> values) 
 - 
                                        replaceAllAdditionalQueryParamsfinal ImageGenerateParams.Builder replaceAllAdditionalQueryParams(QueryParams additionalQueryParams) 
 - 
                                        replaceAllAdditionalQueryParamsfinal ImageGenerateParams.Builder replaceAllAdditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams) 
 - 
                                        removeAdditionalQueryParamsfinal ImageGenerateParams.Builder removeAdditionalQueryParams(String key) 
 - 
                                        removeAllAdditionalQueryParamsfinal ImageGenerateParams.Builder removeAllAdditionalQueryParams(Set<String> keys) 
 - 
                                        buildfinal ImageGenerateParams build() Returns an immutable instance of ImageGenerateParams. Further updates to this Builder will not mutate the returned instance. The following fields are required: .prompt()
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-