Generate Images
Creates an image given a prompt. Learn more.
In: header
Model for image generation: dall-e-2, dall-e-3, or gpt-image-1. Defaults to dall-e-2 unless parameters specific to gpt-image-1 are used.
Text description of the desired image. Maximum length: 32,000 characters for gpt-image-1, 1,000 for dall-e-2, and 4,000 for dall-e-3.
Number of images to generate, from 1 to 10. For dall-e-3, only n=1 is supported.
Generated image size. For gpt-image-1: 1024x1024, 1536x1024 (landscape), 1024x1536 (portrait), or automatic (default; labeled 自动 in the source). For dall-e-2: 256x256, 512x512, or 1024x1024. For dall-e-3: 1024x1024, 1792x1024, or 1024x1792.
Allows transparency in the generated image background. Only supported by gpt-image-1. Choices are transparent, opaque, or automatic (default), labeled 透明, 不透明, and 自动 in the source. Automatic lets the model select the best background.
A transparent background requires an output format supporting transparency: png (default) or webp.
Controls content moderation for images generated by gpt-image-1. Choose low for less restrictive filtering or automatic (default); the source labels these 低, and 自动.
Quality of the generated image.
Response Body
application/json
curl -X POST "https://api.beeaicloud.com/v1/images/generations/" \ -H "Content-Type: application/json" \ -d '{ "prompt": "string" }'{
"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
}
}
}How is this guide?