Asynchronous generation
Create an image-generation task in the background, save its task ID, and query it for status and final output.
Create an asynchronous task when image generation should continue independently of the original connection. Save the returned id, poll its status with increasing intervals, and download the signed result URL promptly after success.
Authorization and request format
Authorization: Bearer $WYLON_API_KEY.application/json.Create a task
Create parameters
image. If omitted, the API treats the request as a video task.Qwen/Qwen-Image-2512.widthxheight format.false.0.Current model limits
For Qwen/Qwen-Image-2512 only:
| Parameter | Supported values | Default |
|---|---|---|
size | 1328x1328, 1664x928, 928x1664, 1104x1472, 1584x1056 | 1664x928 |
n | 1 | 1 |
V1 adds an “AI-generated” watermark and does not support partial-image streaming.
Query a task
Send a GET request with the returned task ID. Add detail=true to include the effective image_parameters. Poll at a reasonable interval and stop at a terminal status.
| Status | Meaning | Action |
|---|---|---|
queued | Accepted and waiting | Query again later |
running | Generating | Query again later |
succeeded | Completed | Download the image |
failed | Generation failed | Read error |
cancelled | Cancelled while queued | Stop polling |
expired | Task or result expired | Create a new task if needed |
Read and download the result
When status=succeeded and file_status=available, the signed URL is in data[0].url and its expiry time is in data[0].url_expires_at. Download it promptly and persist the file in your own storage if needed. After expiry, file_status changes to expired, and the URL is not reissued.
Error handling
For network errors or 5xx responses after task creation, query the original task before submitting another request. This prevents duplicate generation and charges.
