Generate image
Generate image
OpenAI-compatible image generation endpoint. Available models follow /v1/models and the console model pricing page.
POST
Generate image
Authorizations
API key (sk-xxx)
Body
application/json
Example:
"gpt-image-2"
Image description
Required range:
1 <= x <= 10Image size. Supported sizes vary by model, for example 1024x1024, 1024x1792, or 1792x1024.
Example:
"1024x1024"
Image quality. Supported values vary by model, for example auto, standard, hd, or high.
Example:
"auto"
Available options:
vivid, natural Available options:
url, b64_json Whether to stream the response. Depends on support from the selected model.
Background setting. Depends on support from the selected model.
Output format. Depends on support from the selected model.
Partial image return setting. Depends on support from the selected model.