Skip to main content
GET
/
v1
/
tasks
/
{taskId}
Get task
curl --request GET \
  --url https://api.example.com/v1/tasks/{taskId}
{
  "taskId": "<string>",
  "sessionId": "<string>",
  "endUserId": "<string>",
  "task": "<string>",
  "status": "<string>",
  "result": {},
  "structured_content": {},
  "html_dump": "<string>",
  "totalSteps": 123,
  "durationMs": 123,
  "visitedUrls": [
    "<string>"
  ],
  "stepSummaries": [
    {}
  ],
  "error": "<string>",
  "createdAt": {},
  "updatedAt": {}
}

Path parameters

taskId
string
required
The task identifier returned by POST /v1/tasks.

Response — 200 OK

taskId
string
Task identifier.
sessionId
string
The session this task belongs to.
endUserId
string
The end-user the task ran for.
task
string
The prompt as originally submitted.
status
string
"pending" | "running" | "completed" | "failed" | "cancelled".
result
string | object
The final answer. String for most tasks; JSON object for tasks that return structured data or when schema was provided.
structured_content
object
Only present when the request included schema. The object conforming to that schema.
html_dump
string
Only present when the request had include_html_dump: true. Raw HTML of the final page.
totalSteps
number
Number of agent steps executed.
durationMs
number
Wall-clock duration of the task in milliseconds.
visitedUrls
string[]
Domains the agent navigated to, deduplicated in order.
stepSummaries
StepSummary[]
Per-step trace: { n, type, msg, success }.
error
string
Populated only when status == "failed".
createdAt
string (ISO 8601)
When the task was submitted.
updatedAt
string (ISO 8601)
Last status change.
Additional internal fields may be present on the response for observability and may change without notice. Rely only on the fields documented above.

Example

curl "$API_BASE/tasks/7f2a..." \
  -H "Authorization: Bearer $API_KEY"

Polling pattern

Both SDKs’ tasks.run(...) wrap submit + poll in one call. If you’re polling yourself:
submission = client.tasks.submit(end_user_id="alice", task="...")
while True:
    task = client.tasks.get(submission.task_id)
    if task.is_terminal:
        break
    time.sleep(2)
Recommended poll interval: 2 seconds. Lower than that wastes requests; higher than that adds user-visible latency.

Errors

CodeMeaning
401Missing Authorization header
403Task belongs to another business
404Unknown taskId