Class Tool.ImageGeneration
- 
                    
                    - All Implemented Interfaces:
 
 public final class Tool.ImageGenerationA tool that generates images using a model like gpt-image-1.
- 
                
                    
                    - 
                                
                            
                                Nested Class SummaryNested Classes Modifier and Type Class Description public final classTool.ImageGeneration.BuilderA builder for ImageGeneration. public final classTool.ImageGeneration.BackgroundBackground type for the generated image. One of transparent,opaque, orauto. Default:auto.public final classTool.ImageGeneration.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 for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.public final classTool.ImageGeneration.InputImageMaskOptional mask for inpainting. Contains image_url(string, optional) andfile_id(string, optional).public final classTool.ImageGeneration.ModelThe image generation model to use. Default: gpt-image-1.public final classTool.ImageGeneration.ModerationModeration level for the generated image. Default: auto.public final classTool.ImageGeneration.OutputFormatThe output format of the generated image. One of png,webp, orjpeg. Default:png.public final classTool.ImageGeneration.QualityThe quality of the generated image. One of low,medium,high, orauto. Default:auto.public final classTool.ImageGeneration.SizeThe size of the generated image. One of 1024x1024,1024x1536,1536x1024, orauto. Default:auto.
 - 
                                
                            
                                Method SummaryModifier and Type Method Description final JsonValue_type()The type of the image generation tool. final Optional<Tool.ImageGeneration.Background>background()Background type for the generated image. final Optional<Tool.ImageGeneration.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 for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.final Optional<Tool.ImageGeneration.InputImageMask>inputImageMask()Optional mask for inpainting. final Optional<Tool.ImageGeneration.Model>model()The image generation model to use. final Optional<Tool.ImageGeneration.Moderation>moderation()Moderation level for the generated image. final Optional<Long>outputCompression()Compression level for the output image. final Optional<Tool.ImageGeneration.OutputFormat>outputFormat()The output format of the generated image. final Optional<Long>partialImages()Number of partial images to generate in streaming mode, from 0 (default value) to 3. final Optional<Tool.ImageGeneration.Quality>quality()The quality of the generated image. final Optional<Tool.ImageGeneration.Size>size()The size of the generated image. final JsonField<Tool.ImageGeneration.Background>_background()Returns the raw JSON value of background. final JsonField<Tool.ImageGeneration.InputFidelity>_inputFidelity()Returns the raw JSON value of inputFidelity. final JsonField<Tool.ImageGeneration.InputImageMask>_inputImageMask()Returns the raw JSON value of inputImageMask. final JsonField<Tool.ImageGeneration.Model>_model()Returns the raw JSON value of model. final JsonField<Tool.ImageGeneration.Moderation>_moderation()Returns the raw JSON value of moderation. final JsonField<Long>_outputCompression()Returns the raw JSON value of outputCompression. final JsonField<Tool.ImageGeneration.OutputFormat>_outputFormat()Returns the raw JSON value of outputFormat. final JsonField<Long>_partialImages()Returns the raw JSON value of partialImages. final JsonField<Tool.ImageGeneration.Quality>_quality()Returns the raw JSON value of quality. final JsonField<Tool.ImageGeneration.Size>_size()Returns the raw JSON value of size. final Map<String, JsonValue>_additionalProperties()final Tool.ImageGeneration.BuildertoBuilder()final Tool.ImageGenerationvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static Tool.ImageGeneration.Builderbuilder()Returns a mutable builder for constructing an instance of ImageGeneration. - 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        _typefinal JsonValue _type() The type of the image generation tool. Always image_generation.Expected to always return the following: JsonValue.from("image_generation")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value). 
 - 
                                        backgroundfinal Optional<Tool.ImageGeneration.Background> background() Background type for the generated image. One of transparent,opaque, orauto. Default:auto.
 - 
                                        inputFidelityfinal Optional<Tool.ImageGeneration.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 for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.
 - 
                                        inputImageMaskfinal Optional<Tool.ImageGeneration.InputImageMask> inputImageMask() Optional mask for inpainting. Contains image_url(string, optional) andfile_id(string, optional).
 - 
                                        modelfinal Optional<Tool.ImageGeneration.Model> model() The image generation model to use. Default: gpt-image-1.
 - 
                                        moderationfinal Optional<Tool.ImageGeneration.Moderation> moderation() Moderation level for the generated image. Default: auto.
 - 
                                        outputCompressionfinal Optional<Long> outputCompression() Compression level for the output image. Default: 100. 
 - 
                                        outputFormatfinal Optional<Tool.ImageGeneration.OutputFormat> outputFormat() The output format of the generated image. One of png,webp, orjpeg. Default:png.
 - 
                                        partialImagesfinal Optional<Long> partialImages() Number of partial images to generate in streaming mode, from 0 (default value) to 3. 
 - 
                                        qualityfinal Optional<Tool.ImageGeneration.Quality> quality() The quality of the generated image. One of low,medium,high, orauto. Default:auto.
 - 
                                        sizefinal Optional<Tool.ImageGeneration.Size> size() The size of the generated image. One of 1024x1024,1024x1536,1536x1024, orauto. Default:auto.
 - 
                                        _backgroundfinal JsonField<Tool.ImageGeneration.Background> _background() Returns the raw JSON value of background. Unlike background, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _inputFidelityfinal JsonField<Tool.ImageGeneration.InputFidelity> _inputFidelity() Returns the raw JSON value of inputFidelity. Unlike inputFidelity, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _inputImageMaskfinal JsonField<Tool.ImageGeneration.InputImageMask> _inputImageMask() Returns the raw JSON value of inputImageMask. Unlike inputImageMask, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _modelfinal JsonField<Tool.ImageGeneration.Model> _model() Returns the raw JSON value of model. Unlike model, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _moderationfinal JsonField<Tool.ImageGeneration.Moderation> _moderation() Returns the raw JSON value of moderation. Unlike moderation, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _outputCompressionfinal JsonField<Long> _outputCompression() Returns the raw JSON value of outputCompression. Unlike outputCompression, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _outputFormatfinal JsonField<Tool.ImageGeneration.OutputFormat> _outputFormat() Returns the raw JSON value of outputFormat. Unlike outputFormat, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _partialImagesfinal JsonField<Long> _partialImages() Returns the raw JSON value of partialImages. Unlike partialImages, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _qualityfinal JsonField<Tool.ImageGeneration.Quality> _quality() Returns the raw JSON value of quality. Unlike quality, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _sizefinal JsonField<Tool.ImageGeneration.Size> _size() Returns the raw JSON value of size. Unlike size, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _additionalPropertiesfinal Map<String, JsonValue> _additionalProperties() 
 - 
                                        toBuilderfinal Tool.ImageGeneration.Builder toBuilder() 
 - 
                                        validatefinal Tool.ImageGeneration validate() 
 - 
                                        builderfinal static Tool.ImageGeneration.Builder builder() Returns a mutable builder for constructing an instance of ImageGeneration. 
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-