Class ImageEditParams
- 
                    
                    - All Implemented Interfaces:
- 
                            
                            com.openai.core.Params
 
 public final class ImageEditParams implements Params Creates an edited or extended image given one or more source images and a prompt. This endpoint only supports gpt-image-1anddall-e-2.
- 
                
                    
                    - 
                                
                            
                                Nested Class SummaryNested Classes Modifier and Type Class Description public final classImageEditParams.BuilderA builder for ImageEditParams. public final classImageEditParams.Bodypublic final classImageEditParams.ImageThe image(s) to edit. Must be a supported image file or an array of images. For gpt-image-1, each image should be apng,webp, orjpgfile less than 50MB. You can provide up to 16 images.For dall-e-2, you can only provide one image, and it should be a squarepngfile less than 4MB.public final classImageEditParams.BackgroundAllows 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.public final classImageEditParams.InputFidelityControl how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for gpt-image-1. Unsupported forgpt-image-1-mini. Supportshighandlow. Defaults tolow.public final classImageEditParams.OutputFormatThe format in which the generated images are returned. This parameter is only supported for gpt-image-1. Must be one ofpng,jpeg, orwebp. The default value ispng.public final classImageEditParams.QualityThe quality of the image that will be generated. high,mediumandloware only supported forgpt-image-1.dall-e-2only supportsstandardquality. Defaults toauto.public final classImageEditParams.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. This parameter is only supported fordall-e-2, asgpt-image-1will always return base64-encoded images.public final classImageEditParams.SizeThe size of the generated images. Must be one of 1024x1024,1536x1024(landscape),1024x1536(portrait), orauto(default value) forgpt-image-1, and one of256x256,512x512, or1024x1024fordall-e-2.
 - 
                                
                            
                                Method SummaryModifier and Type Method Description final ImageEditParams.Imageimage()The image(s) to edit. final Stringprompt()A text description of the desired image(s). final Optional<ImageEditParams.Background>background()Allows to set transparency for the background of the generated image(s). final Optional<ImageEditParams.InputFidelity>inputFidelity()Control how much effort the model will exert to match the style and features, especially facial features, of input images. final Optional<InputStream>mask()An additional image whose fully transparent areas (e.g. final Optional<ImageModel>model()The model to use for image generation. final Optional<Long>n()The number of images to generate. final Optional<Long>outputCompression()The compression level (0-100%) for the generated images. final Optional<ImageEditParams.OutputFormat>outputFormat()The format in which the generated images are returned. final Optional<Long>partialImages()The number of partial images to generate. final Optional<ImageEditParams.Quality>quality()The quality of the image that will be generated. final Optional<ImageEditParams.ResponseFormat>responseFormat()The format in which the generated images are returned. final Optional<ImageEditParams.Size>size()The size 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 MultipartField<ImageEditParams.Image>_image()Returns the raw multipart value of image. final MultipartField<String>_prompt()Returns the raw multipart value of prompt. final MultipartField<ImageEditParams.Background>_background()Returns the raw multipart value of background. final MultipartField<ImageEditParams.InputFidelity>_inputFidelity()Returns the raw multipart value of inputFidelity. final MultipartField<InputStream>_mask()Returns the raw multipart value of mask. final MultipartField<ImageModel>_model()Returns the raw multipart value of model. final MultipartField<Long>_n()Returns the raw multipart value of n. final MultipartField<Long>_outputCompression()Returns the raw multipart value of outputCompression. final MultipartField<ImageEditParams.OutputFormat>_outputFormat()Returns the raw multipart value of outputFormat. final MultipartField<Long>_partialImages()Returns the raw multipart value of partialImages. final MultipartField<ImageEditParams.Quality>_quality()Returns the raw multipart value of quality. final MultipartField<ImageEditParams.ResponseFormat>_responseFormat()Returns the raw multipart value of responseFormat. final MultipartField<ImageEditParams.Size>_size()Returns the raw multipart value of size. final MultipartField<String>_user()Returns the raw multipart value of user. final Map<String, JsonValue>_additionalBodyProperties()final Headers_additionalHeaders()Additional headers to send with the request. final QueryParams_additionalQueryParams()Additional query param to send with the request. final ImageEditParams.BuildertoBuilder()final Map<String, MultipartField<?>>_body()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. Booleanequals(Object other)IntegerhashCode()StringtoString()final static ImageEditParams.Builderbuilder()Returns a mutable builder for constructing an instance of ImageEditParams. - 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        imagefinal ImageEditParams.Image image() The image(s) to edit. Must be a supported image file or an array of images. For gpt-image-1, each image should be apng,webp, orjpgfile less than 50MB. You can provide up to 16 images.For dall-e-2, you can only provide one image, and it should be a squarepngfile less than 4MB.
 - 
                                        promptfinal String prompt() A text description of the desired image(s). The maximum length is 1000 characters for dall-e-2, and 32000 characters forgpt-image-1.
 - 
                                        backgroundfinal Optional<ImageEditParams.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.
 - 
                                        inputFidelityfinal Optional<ImageEditParams.InputFidelity> inputFidelity() Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for gpt-image-1. Unsupported forgpt-image-1-mini. Supportshighandlow. Defaults tolow.
 - 
                                        maskfinal Optional<InputStream> mask() An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where imageshould be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions asimage.
 - 
                                        modelfinal Optional<ImageModel> model() The model to use for image generation. Only dall-e-2andgpt-image-1are supported. Defaults todall-e-2unless a parameter specific togpt-image-1is used.
 - 
                                        outputCompressionfinal Optional<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.
 - 
                                        outputFormatfinal Optional<ImageEditParams.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. The default value ispng.
 - 
                                        partialImagesfinal Optional<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. 
 - 
                                        qualityfinal Optional<ImageEditParams.Quality> quality() The quality of the image that will be generated. high,mediumandloware only supported forgpt-image-1.dall-e-2only supportsstandardquality. Defaults toauto.
 - 
                                        responseFormatfinal Optional<ImageEditParams.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. This parameter is only supported fordall-e-2, asgpt-image-1will always return base64-encoded images.
 - 
                                        sizefinal Optional<ImageEditParams.Size> size() The size of the generated images. Must be one of 1024x1024,1536x1024(landscape),1024x1536(portrait), orauto(default value) forgpt-image-1, and one of256x256,512x512, or1024x1024fordall-e-2.
 - 
                                        userfinal Optional<String> user() A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more. 
 - 
                                        _imagefinal MultipartField<ImageEditParams.Image> _image() Returns the raw multipart value of image. Unlike image, this method doesn't throw if the multipart field has an unexpected type. 
 - 
                                        _promptfinal MultipartField<String> _prompt() Returns the raw multipart value of prompt. Unlike prompt, this method doesn't throw if the multipart field has an unexpected type. 
 - 
                                        _backgroundfinal MultipartField<ImageEditParams.Background> _background() Returns the raw multipart value of background. Unlike background, this method doesn't throw if the multipart field has an unexpected type. 
 - 
                                        _inputFidelityfinal MultipartField<ImageEditParams.InputFidelity> _inputFidelity() Returns the raw multipart value of inputFidelity. Unlike inputFidelity, this method doesn't throw if the multipart field has an unexpected type. 
 - 
                                        _maskfinal MultipartField<InputStream> _mask() Returns the raw multipart value of mask. Unlike mask, this method doesn't throw if the multipart field has an unexpected type. 
 - 
                                        _modelfinal MultipartField<ImageModel> _model() Returns the raw multipart value of model. Unlike model, this method doesn't throw if the multipart field has an unexpected type. 
 - 
                                        _nfinal MultipartField<Long> _n() Returns the raw multipart value of n. Unlike n, this method doesn't throw if the multipart field has an unexpected type. 
 - 
                                        _outputCompressionfinal MultipartField<Long> _outputCompression() Returns the raw multipart value of outputCompression. Unlike outputCompression, this method doesn't throw if the multipart field has an unexpected type. 
 - 
                                        _outputFormatfinal MultipartField<ImageEditParams.OutputFormat> _outputFormat() Returns the raw multipart value of outputFormat. Unlike outputFormat, this method doesn't throw if the multipart field has an unexpected type. 
 - 
                                        _partialImagesfinal MultipartField<Long> _partialImages() Returns the raw multipart value of partialImages. Unlike partialImages, this method doesn't throw if the multipart field has an unexpected type. 
 - 
                                        _qualityfinal MultipartField<ImageEditParams.Quality> _quality() Returns the raw multipart value of quality. Unlike quality, this method doesn't throw if the multipart field has an unexpected type. 
 - 
                                        _responseFormatfinal MultipartField<ImageEditParams.ResponseFormat> _responseFormat() Returns the raw multipart value of responseFormat. Unlike responseFormat, this method doesn't throw if the multipart field has an unexpected type. 
 - 
                                        _sizefinal MultipartField<ImageEditParams.Size> _size() Returns the raw multipart value of size. Unlike size, this method doesn't throw if the multipart field has an unexpected type. 
 - 
                                        _userfinal MultipartField<String> _user() Returns the raw multipart value of user. Unlike user, this method doesn't throw if the multipart field has an unexpected type. 
 - 
                                        _additionalBodyPropertiesfinal Map<String, JsonValue> _additionalBodyProperties() 
 - 
                                        _additionalHeadersfinal Headers _additionalHeaders() Additional headers to send with the request. 
 - 
                                        _additionalQueryParamsfinal QueryParams _additionalQueryParams() Additional query param to send with the request. 
 - 
                                        toBuilderfinal ImageEditParams.Builder toBuilder() 
 - 
                                        _bodyfinal Map<String, MultipartField<?>> _body() 
 - 
                                        _headersHeaders _headers() The full set of headers in the parameters, including both fixed and additional headers. 
 - 
                                        _queryParamsQueryParams _queryParams() The full set of query params in the parameters, including both fixed and additional query params. 
 - 
                                        builderfinal static ImageEditParams.Builder builder() Returns a mutable builder for constructing an instance of ImageEditParams. The following fields are required: .image() .prompt()
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-