Qwen Image Edit
qwen-image-edit-spicy edits an image from a text instruction, optionally guided by up to two more
reference images. The input image defines the output's composition and dimensions.
POST
https://llm.siraya.ai/v1/images/generations
Use /v1/images/generations
This model takes its input image on the generations endpoint, not /v1/images/edits. The
finished image comes back in the same response — no polling. Generation typically takes 10–60
seconds.
Supported Models
| Model ID | Inputs | Output size |
|---|---|---|
qwen-image-edit-spicy |
image + up to 2 reference images | follows the input image |
Header
Authorization
string
Required
Your API Key (e.g.,
Bearer <API_KEY>).
Body
model
string
Required
qwen-image-edit-spicy.
prompt
string
Required
The edit instruction. With reference images, address them by position — the
image is reference
image 1.
image
string
Required
The image to edit, URL or base64. It defines the output's composition and dimensions.
reference_images
array
Up to 2 additional images, URL or base64. Index
0 is reference image 2, index 1 is reference
image 3. Omit for single-image editing.
seed
integer
Random seed for reproducibility. Omit it, or pass
0, for a random seed.
curl https://llm.siraya.ai/v1/images/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <API_KEY>" \
-d '{
"model": "qwen-image-edit-spicy",
"prompt": "Dress the person in image 1 in the jacket from image 2",
"image": "https://your-domain.com/person.jpg",
"reference_images": ["https://your-domain.com/jacket.jpg"]
}'
import requests
url = "https://llm.siraya.ai/v1/images/generations"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer <API_KEY>"
}
data = {
"model": "qwen-image-edit-spicy",
"prompt": "Dress the person in image 1 in the jacket from image 2",
"image": "https://your-domain.com/person.jpg",
"reference_images": ["https://your-domain.com/jacket.jpg"]
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
Example Response
Behavior worth knowing
Image URLs must be public. Inputs are fetched by the model service itself; a URL behind authentication fails with a download error.
Prefer URLs over base64. The request-body size limit applies to the whole payload, and two or three base64 photos can exceed it.
Errors
A request-time refusal is final — retrying the same body won't help.
| Status | Meaning |
|---|---|
400 |
Parameter validation — a missing image or prompt, too many reference images, or an image that could not be fetched |
401 |
Invalid API key |
404 |
Unrecognized model code |