class

OpenAI::ImageRequest

Inherits JSON::Serializable / Reference / Object

Constructors

new(pull : JSON::PullParser)
Source
new(prompt : 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

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
prompt

A text description of the desired image(s). The maximum length is 1000 characters.

Source
prompt=(prompt : String)

A text description of the desired image(s). The maximum length is 1000 characters.

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