Skip to main content

Request

Response

Image from base64 data

Azure Image

Parameters

header
An optional header used for spend logging metadata, containing JSON properties like user_id, project_id, and env.
string
required
A text description of the desired image(s). Maximum 32,000 characters.
integer
default:1
The number of images to generate. Must be between 1 and 10.
string
default:"1024x1024"
Output image dimensions. Supports arbitrary WIDTHxHEIGHT where both edges are multiples of 16, aspect ratio between 1:3 and 3:1, max edge 3840.Standard values: 1024x1024, 1536x1024, 1024x1536, auto.Supported values depend on the selected model. See the OpenAI image generation guide for the latest model-specific ranges.
string
default:"auto"
Image quality level. Higher quality increases cost and latency.Allowed values: low, medium, high, auto
string
default:"auto"
Background behavior for the generated image.Allowed values: opaque, auto
transparent is not supported on gpt-image-2.
integer
Compression level (0–100). Only applies when output_format is jpeg.
boolean
default:false
Stream partial images as they are generated. Use with --no-buffer in curl.
integer
Number of partial images to emit during streaming. Value between 0 and 3. Only used when stream is true.
string
default:"auto"
Content moderation strictness.Allowed values: auto, low

Params to Avoid

The generation endpoint only returns b64_json. Requesting a URL response format is not supported and returns an empty response.