Image
OpenAI image generator
Operations
Create
Creates an image given a prompt
function : Create(prompt:String, token:String) ~ API.OpenAI.ImageParameters
| Name | Type | Description |
|---|---|---|
| prompt | String | text description of the desired image |
| token | String | API token |
Return
| Type | Description |
|---|---|
| Image | generated image |
Create
Creates an image given a prompt
function : Create(prompt:String, model:String, size:Image->Size, token:String) ~ API.OpenAI.ImageParameters
| Name | Type | Description |
|---|---|---|
| prompt | String | text description of the desired image |
| model | String | model name |
| size | Image->Size | size of the generated image |
| token | String | API token |
Return
| Type | Description |
|---|---|
| Image | generated image |
Create
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.ImageParameters
| Name | Type | Description |
|---|---|---|
| prompt | String | text description of the desired image |
| model | String | model name |
| n | Int | number of images |
| quality | String | quality of the image that will be generated |
| response_format | String | format in which the generated images are returned |
| size | Image->Size | size of the generated image |
| style | String | style of the generated image |
| user | String | identifier representing your end-user |
| token | String | API token |
Return
| Type | Description |
|---|---|
| Image | generated 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.ImageParameters
| Name | Type | Description |
|---|---|---|
| image_name | String | image name |
| image_content | Byte | image content |
| prompt | String | text description of the desired image |
| token | String | API token |
Return
| Type | Description |
|---|---|
| Image | edited 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, mask_name:String, mask_content:Byte[], model:String, n:Int, size:Image->Size, response_format:String, user:String, token:String) ~ API.OpenAI.ImageParameters
| Name | Type | Description |
|---|---|---|
| image_name | String | image name |
| image_content | Byte | image content |
| prompt | String | text description of the desired image |
| mask_name | String | mask name |
| mask_content | Byte | additional image whose fully transparent areas (e.g. where alpha is zero) |
| model | String | model name |
| n | Int | number of images |
| size | Image->Size | size of the generated image |
| response_format | String | format in which the generated images are returned |
| user | String | identifier representing your end-user |
| token | String | API token |
Return
| Type | Description |
|---|---|
| Image | edited image |
GetCreatedAt
Unix timestamp (in seconds) of when the object instance was created
method : public : GetCreatedAt() ~ IntReturn
| Type | Description |
|---|---|
| Int | time with the object instance was created |
GetUrls
Get the generated images URLs
method : public : GetUrls() ~ Url[]Return
| Type | Description |
|---|---|
| Url[] | generated images URLs |
Variation
Creates a variation of a given image
function : Variation(image_name:String, image_content:Byte[], token:String) ~ API.OpenAI.ImageParameters
| Name | Type | Description |
|---|---|---|
| image_name | String | image name |
| image_content | Byte | image content |
| token | String | API token |
Return
| Type | Description |
|---|---|
| Image | image variation |
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.ImageParameters
| Name | Type | Description |
|---|---|---|
| image_name | String | image name |
| image_content | Byte | image content |
| model | String | model name |
| n | Int | number of images |
| response_format | String | format in which the generated images are returned |
| size | Image->Size | size of the generated image |
| user | String | identifier representing your end-user |
| token | String | API token |
Return
| Type | Description |
|---|---|
| Image | image variation |