Image generation uses the native OpenAI Images API protocol (POST /v1/images/generations) and returns results synchronously: the connection remains open until generation is complete (typically from a few seconds to 2 minutes, depending on the model and resolution). The response body directly contains the image URL or Base64 data, with no task ID and no polling required. This applies to all image generation models connected to this endpoint. Refer to List Models for available models.
Authorizations
Bearer Token authentication. To obtain an API Key, visit the API Key Management Page
Authorization: Bearer YOUR_API_KEYEndpoint
POST /v1/images/generationsThe request body uses native OpenAI fields (different models support different subsets of parameters; refer to the model provider's official documentation):
model(required): Image generation model nameprompt(required): Image descriptionn(optional): Number of images to generate; defaults to 1size(optional): Pixel dimensions, such as"1024x1024"or"1536x1024"(note that this is a pixel format, not an aspect ratio)quality,response_format(url/b64_json),style, etc.: Passed through when supported by the model
Notes
- Long-running synchronous request: The connection remains open during generation. Set the client timeout to at least 180 seconds, and do not disconnect while generation is in progress (disconnecting does not mean the task has been canceled)
- The validity period of returned image URLs is determined by the upstream provider. Save the images promptly
- For image edits and variations, see Image Edits / Variations
- Model-specific parameters (such as quality tiers and styles) are governed by the upstream provider's official documentation. The platform does not rewrite fields or validate parameters
