ImageEdit

class ImageEdit(val image: FileSource, val mask: FileSource, val prompt: String, val n: Int? = null, val size: ImageSize? = null, val user: String? = null, val model: ModelId? = null)

Image edit request.

Constructors

Link copied to clipboard
constructor(image: FileSource, mask: FileSource, prompt: String, n: Int? = null, size: ImageSize? = null, user: String? = null, model: ModelId? = null)

Properties

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard
val model: ModelId? = null

The model used to generate image. Must be one of dall-e-2 or dall-e-3. If not provided, dall-e-2 is used.

Link copied to clipboard
val n: Int? = null

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

Link copied to clipboard

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

Link copied to clipboard
val size: ImageSize? = null

The size of the generated images.

Link copied to clipboard
val user: String? = null

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