v1

latestOpenAPI 3.1.0Apache 2.02026-07-264001921002.3 KB
OpenAI Integration

Create image

Generates images from text prompts using OpenAI-compatible format.

Note: Azure OpenAI deployments are also supported via the Azure integration endpoint.

Note: This endpoint also works without the /v1 prefix (e.g., /openai/images/generations).

post/openai/v1/images/generations

Request body

modelstring required

Model identifier

promptstring required

Text prompt to generate image

ninteger

Number of images to generate

size'256x256' | '512x512' | '1024x1024' | '1792x1024' | '1024x1792' | '1536x1024' | '1024x1536' | 'auto'

Size of the generated image

quality'standard' | 'hd'

Quality of the generated image

style'natural' | 'vivid'

Style of the generated image

response_format'url' | 'b64_json'

Format of the response. This parameter is not supported for streaming requests.

userstring

User identifier for tracking

streamboolean

Whether to stream the response. When true, images are sent as base64 chunks via SSE.

fallbacksstring[]

Fallback models to try if primary model fails

Response

Successful response. Returns JSON for non-streaming requests, or Server-Sent Events (SSE) stream when stream=true. When streaming, each event contains a chunk of the image as base64 data, with the final event having type image_generation.completed.

createdinteger

Unix timestamp when the image was created

backgroundstring

Background type used

output_formatstring

Output format used

qualitystring

Quality setting used

sizestring

Size setting used