Image API Reference
For the given prompt, the model generates a new image that matches the prompt description.
Create Image
Creates an image for the given text prompt.
Azure OpenAI
Request
POST https://api.core42.ai/openai//deployments/<deployment-id>/images/generations
OpenAI
Request
POST https://api.core42.ai/v1/images/generations
Request Parameters
Name |
Required |
Type |
Description |
---|---|---|---|
model |
true |
string |
ID of the model to use for this request. The available models are |
prompt |
true |
string |
A text description of the desired image(s). The maximum supported length:
|
background |
false |
string or null |
Allows to set transparency for the background of the generated image(s). Must be one of If Note: This parameter applies only to the GPT Image 1 model. |
moderation |
false |
string or null |
Control the content-moderation level for images generated by Note: This parameter applies only to the GPT Image 1 model. |
n |
false |
integer or null |
The number of images to generate. The value must be between 1 and 10. n=1 is the default and supported value for |
quality |
false |
string |
The quality of the image that will be generated. For For
|
output_compression |
false |
integer or null |
The compression level (0-100%) for the generated images. This parameter is only supported for GPT Image 1 model with the |
output_format |
false |
string or null |
The format in which the generated images are returned. Must be one of Note: This parameter applies only to the GPT Image 1 model. |
response_format |
false |
string or null |
The format in which the generated images are returned. Must be one of url or b64_json.
This parameter applies only to the DALL·E 3 model. |
size |
false |
string or null |
The size of the generated images.
|
style |
false |
string or null |
The style of the generated images. Must be one of
Note: This parameter applies only to the DALL·E 3 model. |
user |
false |
string or null |
A unique identifier represents your end-user. |
For the DALL·E 3 model, the consumption for API requests is charged per unit per image. The usage can be monitored in the API request chart available on the Reports page.
Create Image Edit
Creates an edited or extended image given one or more source images and a prompt. This endpoint only supports gpt-image-1
.
Azure OpenAI
Request
POST https://api.core42.ai/openai//deployments/<deployment-id>/images/edits
OpenAI
Request
POST https://api.core42.ai/v1/images/edits
Request Parameters
Name |
Required |
Type |
Description |
---|---|---|---|
image |
true |
string or array |
The image(s) to edit. Must be a supported image file or an array of images.. The available model is |
model |
true |
string |
ID of the model to use for this request. The available models are |
prompt |
true |
string |
A text description of the desired image(s). The maximum supported length for |
background |
false |
string or null |
Allows to set transparency for the background of the generated image(s). Must be one of |
mask |
false |
file |
An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited. If multiple images are provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as image. |
n |
false |
integer or null |
The number of images to generate. The value must be between 1 and 10. |
quality |
false |
string |
The quality of the image that will be generated. |
response_format |
false |
string or null |
The format in which the generated images are returned. Must be one of url or b64_json.
|
size |
false |
string or null |
The size of the generated images. Must be one of |
user |
false |
string or null |
A unique identifier represents your end-user. |