Z-Image
Z-Image generates an image from a text prompt. Two models are available: z-image-spicy, and
z-image-spicy-pro with a larger maximum canvas.
POST
https://llm.siraya.ai/v1/images/generations
The finished image comes back in the same response — no polling. Generation typically takes 10–60 seconds.
Supported Models
| Model ID | Width × height | Default size | prompt_extend default |
|---|---|---|---|
z-image-spicy |
256–1536 px per side | 1024 × 1536 | true (surcharged) |
z-image-spicy-pro |
256–2560 px per side | 1024 × 1024 | false |
Header
Authorization
string
Required
Your API Key (e.g.,
Bearer <API_KEY>).
Body
model
string
Required
z-image-spicy or z-image-spicy-pro.
prompt
string
Required
A text description of the image.
width / height
integer
Output dimensions in pixels: 256–1536 on
z-image-spicy, 256–2560 on z-image-spicy-pro. Defaults:
1024 × 1536 (spicy), 1024 × 1024 (pro).
size
string
A standard
WxH size such as 1024x1024, filling width and height in one field. When both are
sent, size wins.
prompt_extend
boolean
Rewrites the prompt before generation. On by default on
z-image-spicy, where each rewritten request is
surcharged; off by default on z-image-spicy-pro.
seed
integer
Random seed for reproducibility. Omit it, or pass
0, for a random seed.
import requests
url = "https://llm.siraya.ai/v1/images/generations"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer <API_KEY>"
}
data = {
"model": "z-image-spicy-pro",
"prompt": "A lighthouse on a cliff at dusk, oil painting",
"width": 2048,
"height": 1152
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
Example Response
Behavior worth knowing
One image per request. Each call returns a single image in data.
prompt_extend costs extra on z-image-spicy. It is on by default there and each rewritten
request is surcharged — send "prompt_extend": false if you don't need it. On z-image-spicy-pro it
is off unless you turn it on.
Errors
A request-time refusal is final — retrying the same body won't help.
| Status | Meaning |
|---|---|
400 |
Parameter validation — a dimension outside the model's range, or a missing prompt |
401 |
Invalid API key |
404 |
Unrecognized model code |