generate image
Create an image given a prompt. learn more.
POST
/v1/images/generations
https://api.covanexus.com
Authorization
Body
Authorization
Authorization Bearer
Authorization Bearer <token>
Use Bearer Token authentication. Format: Authorization: Bearer $COVA_NEXUS_API_KEY
in: header
Request Body
application/json
model* string
Model for image generation. Parameters to dall-e-2, dall-e-3, or gpt-image-1. Defaults to dall-e-2 unless gpt-image-1 specific parameters are used.
prompt* string
A text description of the desired image. The maximum length for gpt-image-1 is 32000 characters, for dall-e-2 it is 1000 characters, and for dall-e-3 it is 4000 characters.
n? integer
The number of images to generate. Must be between 1 and 10. For dall-e-3, only n=1 is supported.
size? string
The size of the generated image. For gpt-image-1, must be one of 1024x1024, 1536x1024 (landscape), 1024x1536 (portrait) (default). For dall-e-2, must be one of 256x256, 512x512, or 1024x1024. For dall-e-3, one of 1024x1024, 1792x1024, or 1024x1792.
background? string
Allows setting transparency for the background of the generated image. This parameter is only supported for gpt-image-1. Must be one of the following: transparent, opaque (white) (default). When using auto, the model will automatically determine the best background for the image.
moderation? string
Controls the content moderation level of images generated by gpt-image-1. Must be low for less restrictive filtering (default).
quality? string
The quality of the image that will be generated.
stream? string
Streaming output
style? string
image style
user? string
User ID
Response Body
| status code | Type |
|---|---|
| 200 | application/json |
curl -X POST "https://api.covanexus.com/v1/images/generations" \
-H "Authorization: Bearer " \
-d '{
"prompt": "string"
}'200
{
"created": 0,
"data": [
{
"b64_json": "string",
"url": "string"
}
],
"usage": {
"total_tokens": 0,
"input_tokens": 0,
"output_tokens": 0,
"input_tokens_details": {
"text_tokens": 0,
"image_tokens": 0
}
}
}BearerAuth