Class: OpenAI::Models::ImagesResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/images_response.rb

Overview

Defined Under Namespace

Modules: Background, OutputFormat, Quality, Size Classes: Usage

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

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

Methods included from Internal::Util::SorbetRuntimeSupport

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

Constructor Details

#initialize(created: , background: nil, data: nil, output_format: nil, quality: nil, size: nil, usage: nil) ⇒ void

Some parameter documentations has been truncated, see OpenAI::Models::ImagesResponse for more details.

The response from the image generation endpoint.

Parameters:



# File 'lib/openai/models/images_response.rb', line 51

Instance Attribute Details

#backgroundSymbol, ...

The background parameter used for the image generation. Either transparent or opaque.



18
# File 'lib/openai/models/images_response.rb', line 18

optional :background, enum: -> { OpenAI::ImagesResponse::Background }

#createdInteger

The Unix timestamp (in seconds) of when the image was created.

Returns:

  • (Integer)


11
# File 'lib/openai/models/images_response.rb', line 11

required :created, Integer

#dataArray<OpenAI::Models::Image>?

The list of generated images.

Returns:



24
# File 'lib/openai/models/images_response.rb', line 24

optional :data, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Image] }

#output_formatSymbol, ...

The output format of the image generation. Either png, webp, or jpeg.



30
# File 'lib/openai/models/images_response.rb', line 30

optional :output_format, enum: -> { OpenAI::ImagesResponse::OutputFormat }

#qualitySymbol, ...

The quality of the image generated. Either low, medium, or high.

Returns:



36
# File 'lib/openai/models/images_response.rb', line 36

optional :quality, enum: -> { OpenAI::ImagesResponse::Quality }

#sizeSymbol, ...

The size of the image generated. Either 1024x1024, 1024x1536, or 1536x1024.

Returns:



43
# File 'lib/openai/models/images_response.rb', line 43

optional :size, enum: -> { OpenAI::ImagesResponse::Size }

#usageOpenAI::Models::ImagesResponse::Usage?

For gpt-image-1 only, the token usage information for the image generation.



49
# File 'lib/openai/models/images_response.rb', line 49

optional :usage, -> { OpenAI::ImagesResponse::Usage }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/images_response.rb', line 81