Skip to content

OpenAI.Image.Edit

Andrew Lambert edited this page Feb 3, 2023 · 4 revisions

Method signatures

 Shared Function Edit(Request As OpenAI.Request) As OpenAI.Image
 Shared Function Edit(Original As Picture, Prompt As String, Mask As Picture, Size As String = "1024x1024", AsURL As Boolean = False) As OpenAI.Image

Parameters

Edit(OpenAI.Request)

Name Type Comment
Request Request An OpenAI request object.

Edit(Picture, String, Picture, String, Boolean)

Name Type Comment
Original Picture A Picture to edit. Must less than 4MB and square.
Prompt String A description of the edits to be made.
Mask Picture A Picture of the same dimensions as the Original whose fully transparent areas (i.e. where alpha is zero) indicates where the Original should be edited. May be Nil.
Size String Optional. One of: "1024x1024", "512x512", or "256x256"
AsURL Boolean Optional. If True then a URL to the resulting picture is returned instead of the picture itself.

Return value

Returns a new instance of OpenAI.Image containing the response to the query.

Remarks

If Mask is Nil then the Original must have transparency,

See also

Clone this wiki locally