GPT Image
OpenAI's image generation family. All models share one parameter set — GPT Image 2.5 adds two
higher quality tiers on top of GPT Image 2. For editing existing images with these models, see
GPT Image (Edits).
POST
https://llm.siraya.ai/v1/images/generations
Supported Models
| Model ID | Description |
|---|---|
gpt-image-2.5-flare |
Speed-optimized GPT Image 2.5. The default choice for most workloads. |
gpt-image-2.5-sunburst |
Quality-optimized GPT Image 2.5, roughly 2x slower than Flare. |
gpt-image-2 |
Previous generation. Same parameters, without the xhigh / max quality tiers. |
Header
Authorization
string
Required
Your API Key (e.g., `Bearer `).
Body
model
string
Required
The ID of the model to use (
gpt-image-2.5-flare,
gpt-image-2.5-sunburst, or gpt-image-2).
prompt
string
Required
A text description of the desired image.
n
integer
Default: 1
The number of images to generate (1-10).
size
string
Default: auto
The dimensions of the generated image. Any
WIDTHxHEIGHT value is accepted as long as
both sides are multiples of 16, the aspect ratio is between 1:3 and 3:1, and the size does not
exceed 3840x2160 — e.g. 1024x1024, 1536x1024, 2048x1152,
3840x2160. Images are returned at the exact pixel size requested. Use
auto to let the model pick.
quality
string
Default: auto
The quality of the generated image. Possible values:
low, medium,
high, auto. The GPT Image 2.5 models also accept
xhigh and max.
background
string
Default: auto
The background type for the generated image. Possible values:
transparent,
opaque, auto. A transparent background requires
output_format: png.
output_format
string
Default: png
The encoding of the returned image. Possible values:
png, jpeg.
output_compression
integer
Default: 100
The compression level for the output image (0-100). Only valid with
output_format: jpeg.
moderation
string
Default: auto
The content moderation level. Possible values:
low, auto.
async
boolean
Default: false
When
false, the request waits for generation to finish and returns the completed image. When true, it returns immediately with an image id while generation runs in the background. There is no status/poll endpoint for images — pass callbackUrl to receive the result. See Asynchronous generation.
callbackUrl
string
Only used when
async is true. A URL the router will POST to once generation completes (or fails). This is the only way to retrieve the result of an async image job.
extra_body
object
Additional model-specific parameters passed directly to the provider. Unknown top-level fields are also automatically captured into this object.
import requests
url = "https://llm.siraya.ai/v1/images/generations"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer <API_KEY>"
}
data = {
"model": "gpt-image-2.5-flare",
"n": 1,
"prompt": "A child plays the guitar.",
"size": "1536x1024",
"quality": "high",
"output_format": "png"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
Example Response
Choosing a model
gpt-image-2.5-flare |
gpt-image-2.5-sunburst |
gpt-image-2 |
|
|---|---|---|---|
| Optimized for | Speed | Quality | — |
| Relative latency | Baseline | ~2x Flare | — |
quality tiers |
low–max |
low–max |
low–high |
| Best for | Interactive and high-volume generation | Hero images, print, final assets | Existing integrations pinned to this model |
Arbitrary pixel sizes (including 2K and 4K), transparent backgrounds, and jpeg output behave
the same on every model in the family.