Native OpenAI Format
Generate Image
- Create an image from a given prompt. Learn more.
POST
Documentation Index
Fetch the complete documentation index at: https://docs.elkapi.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
All endpoints require Bearer Token authentication.Add it to the request headers:
Body
Model used for image generation. One of
dall-e-2, dall-e-3, or gpt-image-1. Defaults to dall-e-2 unless a gpt-image-1-specific parameter is used.Example: gpt-image-1.5Text description of the desired image. The maximum length is 32,000 characters for
gpt-image-1, 1,000 characters for dall-e-2, and 4,000 characters for dall-e-3.Number of images to generate. Must be between 1 and 10. For
dall-e-3, only n=1 is supported.Size of the generated image. For
gpt-image-1, it must be one of 1024x1024, 1536x1024 (landscape), 1024x1536 (portrait), or auto (default). For dall-e-2, it must be one of 256x256, 512x512, or 1024x1024. For dall-e-3, it must be one of 1024x1024, 1792x1024, or 1024x1792.Allows setting background transparency for the generated image. This parameter is only supported by
gpt-image-1. Must be one of transparent, opaque, or auto (default). When using auto, the model automatically determines the best background for the image.If the background is transparent, the output format must support transparency, so set it to png (default) or webp.Controls the content moderation level for images generated by
gpt-image-1. Use low for less restrictive filtering or auto (default).The quality of the generated image.