Docs / API reference /
Check an async task's status
GET https://api.answerline.dev/v1/async/task/{taskId}
Look up an asynchronous task by ID and get its state, plus the complete structured result payload once it finishes.
Parameters
-
taskIdstring · path required -
Identifier of the task you want to retrieve.
Returns
-
taskobject required -
Summary fields that every async task response includes.
7 properties
-
task.idstring required -
Identifier unique to the task.
-
task.taskType"AIMODE" | "GOOGLE" | "GOOGLE_NEWS" | "GEMINI" | "CHATGPT" | "COPILOT" | "PERPLEXITY" | "GROK" required -
Engine that handles this task.
-
task.status"QUEUED" | "PROCESSING" | "COMPLETED" | "FAILED" required -
Status of the task right now.
-
task.priorityinteger required -
Priority of the task, from 1 to 10; tasks with higher numbers run first. Default: 1.
-
task.createdAtstring required -
Creation time of the task.
-
task.latencyMsinteger | null -
Time from the task's start to its final outcome, in milliseconds. The wait in the queue before it starts is not counted. Null for tasks in
QUEUEDorPROCESSINGstate, and for tasks that failed before processing began. -
task.idempotencyKeystring | null -
Idempotency key supplied with the request, if any.
-
-
creditsobject required -
Charge details for one async task, in USD.
2 properties
-
credits.creditsToChargenumber required -
USD amount held back from the balance for this task.
-
credits.creditsChargednumber | null required -
USD amount charged for the task (0 when a free request covered it); null while it has not finished.
-
-
responseobject -
Complete response payload; included only once the task status is COMPLETED or FAILED.
Responses
- 200
- Success: the task's status, plus its result once finished.
- 401
- Unauthorized - authentication failed
- 404
- Not Found - No such task
- 429
- Too Many Requests - the service dropped the request because it was overloaded (
SERVICE_OVERLOADED), which returnsRetry-Afterwithout any limit headers, or one address presented too many unknown keys (RATE_LIMIT_EXCEEDED, withRetry-After) - 500
- Internal Server Error