All Bundles

Image

OpenAI image generator

Derived from: EndPoint

Operations

Create

Creates an image given a prompt

function : Create(prompt:String, token:String) ~ API.OpenAI.Image
Parameters
NameTypeDescription
promptStringtext description of the desired image
tokenStringAPI token

Return
TypeDescription
Imagegenerated image

Creates an image given a prompt

function : Create(prompt:String, model:String, size:Image->Size, token:String) ~ API.OpenAI.Image
Parameters
NameTypeDescription
promptStringtext description of the desired image
modelStringmodel name
sizeImage->Sizesize of the generated image
tokenStringAPI token

Return
TypeDescription
Imagegenerated image

Creates an image given a prompt

function : Create(prompt:String, model:String, n:Int, quality:String, response_format:String, size:Image->Size, style:String, user:String, token:String) ~ API.OpenAI.Image
Parameters
NameTypeDescription
promptStringtext description of the desired image
modelStringmodel name
nIntnumber of images
qualityStringquality of the image that will be generated
response_formatStringformat in which the generated images are returned
sizeImage->Sizesize of the generated image
styleStringstyle of the generated image
userStringidentifier representing your end-user
tokenStringAPI token

Return
TypeDescription
Imagegenerated image

Edit

Creates an edited or extended image given an original image and a prompt

function : Edit(image_name:String, image_content:Byte[], prompt:String, token:String) ~ API.OpenAI.Image
Parameters
NameTypeDescription
image_nameStringimage name
image_contentByte[]image content
promptStringtext description of the desired image
tokenStringAPI token

Return
TypeDescription
Imageedited image

Creates an edited or extended image given an original image and a prompt

function : Edit(image_name:String, image_content:Byte[], prompt:String, mask_name:String, mask_content:Byte[], model:String, n:Int, size:Image->Size, response_format:String, user:String, token:String) ~ API.OpenAI.Image
Parameters
NameTypeDescription
image_nameStringimage name
image_contentByte[]image content
promptStringtext description of the desired image
mask_nameStringmask name
mask_contentByte[]additional image whose fully transparent areas (e.g. where alpha is zero)
modelStringmodel name
nIntnumber of images
sizeImage->Sizesize of the generated image
response_formatStringformat in which the generated images are returned
userStringidentifier representing your end-user
tokenStringAPI token

Return
TypeDescription
Imageedited image

GetCreatedAt

Unix timestamp (in seconds) of when the object instance was created

method : public : GetCreatedAt() ~ Int
Return
TypeDescription
Inttime with the object instance was created

GetUrls

Get the generated images URLs

method : public : GetUrls() ~ Url[]
Return
TypeDescription
Urlgenerated images URLs

Variation

Creates a variation of a given image

function : Variation(image_name:String, image_content:Byte[], token:String) ~ API.OpenAI.Image
Parameters
NameTypeDescription
image_nameStringimage name
image_contentByte[]image content
tokenStringAPI token

Return
TypeDescription
Imageimage variation

Creates a variation of a given image

function : Variation(image_name:String, image_content:Byte[], model:String, n:Int, response_format:String, size:Image->Size, user:String, token:String) ~ API.OpenAI.Image
Parameters
NameTypeDescription
image_nameStringimage name
image_contentByte[]image content
modelStringmodel name
nIntnumber of images
response_formatStringformat in which the generated images are returned
sizeImage->Sizesize of the generated image
userStringidentifier representing your end-user
tokenStringAPI token

Return
TypeDescription
Imageimage variation