Query the execution status and result of an asynchronous task.
GET https://123api.co/v1/tasks/{task_id}
curl --request GET \
--url https://123api.co/v1/tasks/YOUR_TASK_ID \
--header 'Authorization: Bearer <token>'curl --request GET \
--url 'https://123api.co/v1/tasks/YOUR_TASK_ID?language=en' \
--header 'Authorization: Bearer <token>'| Status | Meaning |
|---|---|
queued | Task accepted and waiting |
processing | Task is being executed |
completed | Task finished successfully |
failed | Task failed and needs inspection |
{
"task_id": "task-unified-123456",
"status": "completed",
"result": {
"url": "https://example.com/final-asset.png"
}
}Poll at a fixed interval such as 2 to 5 seconds, and stop polling as soon as the task reaches a terminal state.