Class: OpenAI::Models::ImagesResponse

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

Overview

Defined Under Namespace

Classes: Usage

Instance Attribute 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, 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: , data: nil, usage: nil) ⇒ Object

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

The response from the image generation endpoint.

Parameters:

  • created (Integer) (defaults to: )

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

  • data (Array<OpenAI::Models::Image>) (defaults to: nil)

    The list of generated images.

  • usage (OpenAI::Models::ImagesResponse::Usage) (defaults to: nil)

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



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

Instance Attribute Details

#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:



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

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

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

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



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

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