class

OpenAI::ImageVariationRequest

Inherits JSON::Serializable / Reference / Object

Constructors

new(pull : JSON::PullParser)
Source
new(image : File | Path | String, num_images : Int32 = 1, size : OpenAI::ImageSize = :large, response_format : OpenAI::ImageRespFormat = :url, user : Nil | String = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

build_metada(builder : HTTP::FormData::Builder)
Source
image

The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.

Source
image=(image : File | Path | String)

The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.

Source
num_images

The number of images to generate. Must be between 1 and 10.

Source
num_images=(num_images : Int32)

The number of images to generate. Must be between 1 and 10.

Source
response_format

The format in which the generated images are returned.

Source
response_format=(response_format : ImageRespFormat)

The format in which the generated images are returned.

Source
size

The size of the generated images

Source
size=(size : ImageSize)

The size of the generated images

Source
user

A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.

Source
user=(user : String | Nil)

A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.

Source