Class BetaTool.ImageGeneration.Background

  • All Implemented Interfaces:
    com.openai.core.Enum

    
    public final class BetaTool.ImageGeneration.Background
     implements Enum
                        

    Allows to set transparency for the background of the generated image(s). This parameter is only supported for GPT image models that support transparent backgrounds. Must be one of transparent, opaque, or auto (default value). When auto is used, the model will automatically determine the best background for the image.

    gpt-image-2 and gpt-image-2-2026-04-21 do not support transparent backgrounds. Requests with background set to transparent will return an error for these models; use opaque or auto instead.

    If transparent, the output format needs to support transparency, so it should be set to either png (default value) or webp.

    • Constructor Detail