class
OpenAI::ImageEditRequest
- OpenAI::ImageEditRequest
- Reference
- Object
Included Modules
- JSON::Serializable
Extended Modules
- JSON::Schema
Defined in:
openai/api/image.crConstructors
- .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)
- .new(pull : JSON::PullParser)
Instance Method Summary
- #build_metada(builder : HTTP::FormData::Builder)
-
#image : File | Path | String
The image to edit.
-
#image=(image : File | Path | String)
The image to edit.
-
#mask : File | Path | String | Nil
An additional image whose fully transparent areas (e.g.
-
#mask=(mask : File | Path | String | Nil)
An additional image whose fully transparent areas (e.g.
-
#num_images : Int32
The number of images to generate.
-
#num_images=(num_images : Int32)
The number of images to generate.
-
#prompt : String
A text description of the desired image(s).
-
#prompt=(prompt : String)
A text description of the desired image(s).
-
#response_format : ImageRespFormat
The format in which the generated images are returned.
-
#response_format=(response_format : ImageRespFormat)
The format in which the generated images are returned.
-
#size : ImageSize
The size of the generated images
-
#size=(size : ImageSize)
The size of the generated images
-
#user : String | Nil
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
-
#user=(user : String | Nil)
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
Constructor Detail
Instance Method Detail
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.
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.
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.
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.
A text description of the desired image(s). The maximum length is 1000 characters.
A text description of the desired image(s). The maximum length is 1000 characters.
The format in which the generated images are returned.
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.