Module: OpenAI::Models::Beta::BetaTool::ImageGeneration::Background

Extended by:
Internal::Type::Enum
Defined in:
lib/openai/models/beta/beta_tool.rb

Overview

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.

See Also:

  • OpenAI::Models::Beta::BetaTool::ImageGeneration#background

Constant Summary collapse

TRANSPARENT =
:transparent
OPAQUE =
:opaque
AUTO =
:auto

Method Summary

Methods included from Internal::Type::Enum

==, ===, coerce, dump, hash, inspect, to_sorbet_type, values, values

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info