AnswerLine Start free

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

taskId string · path required

Identifier of the task you want to retrieve.

Returns

task object required

Summary fields that every async task response includes.

7 properties
task.id string 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.priority integer required

Priority of the task, from 1 to 10; tasks with higher numbers run first. Default: 1.

task.createdAt string required

Creation time of the task.

task.latencyMs integer | 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 QUEUED or PROCESSING state, and for tasks that failed before processing began.

task.idempotencyKey string | null

Idempotency key supplied with the request, if any.

credits object required

Charge details for one async task, in USD.

2 properties
credits.creditsToCharge number required

USD amount held back from the balance for this task.

credits.creditsCharged number | null required

USD amount charged for the task (0 when a free request covered it); null while it has not finished.

response object

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 returns Retry-After without any limit headers, or one address presented too many unknown keys (RATE_LIMIT_EXCEEDED, with Retry-After)
500
Internal Server Error

Error codes and retries