GET
/v1/fetch/{task_id}Fetch Task
Check the status of a task and retrieve the result when complete. Poll this endpoint every 5-10 seconds until the status is completed or failed.
Path Parameters
task_idrequiredstring
The task ID returned by /v1/imagine or /v1/action.
Example Request
Response — Completed
Response — Processing
Response Fields
task_idstring
Unique task identifier.
actionstring
imagine, upsample1, variation2, etc.
statusstring
pending, processing, completed, failed, or timeout.
progressnumber
Progress percentage (0-100).
promptstring
The original prompt used.
image_urlstring
CDN URL of the generated image. Null if not yet complete.
message_idstring
Discord message ID. Used internally for actions.
componentsarray
Available action buttons (upscale, variation, reroll). Null if not yet complete.
errorstring
Error message if status is failed. Null otherwise.
created_atstring
ISO timestamp of when the task was created.
Task Statuses
Polling Helper
Here is a helper function that polls until the task is complete:
Status Codes
200Task found. Check the status field for current state.
401Invalid or missing API key.
404Task not found or does not belong to your hold.