class

OpenAI::ImageEditRequest

Inherits JSON::Serializable / Reference / Object

Constructors

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

Instance methods

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

The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.

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

The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.

Source
mask

An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as image.

Source
mask=(mask : File | Path | String | Nil)

An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as image.

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