Skip to main content

Endpoint

Description

Retrieves the current status, result, and metadata for a specific task. Use this endpoint to check task progress or retrieve final results.

Authentication

Required: Yes Include API key in header:

Request

Path Parameters

Headers

Response

Success Response

Status: 200 OK Headers:
  • X-Workflow-ID: Temporal workflow identifier (same as task ID)
Body:

Response Fields

Status Values

  • TASK_STATUS_UNSPECIFIED - Status unknown
  • TASK_STATUS_QUEUED - Waiting to execute
  • TASK_STATUS_RUNNING - Currently executing
  • TASK_STATUS_COMPLETED - Successfully completed
  • TASK_STATUS_FAILED - Failed with error
  • TASK_STATUS_PAUSED - Paused by user or HITL review
  • TASK_STATUS_CANCELLED - Cancelled by user
  • TASK_STATUS_TIMEOUT - Exceeded timeout limit

Execution Mode Values

  • EXECUTION_MODE_SIMPLE - Single LLM call, no tools
  • EXECUTION_MODE_STANDARD - Multi-step with tools
  • EXECUTION_MODE_COMPLEX - Advanced reasoning patterns

Examples

Check Task Status

Response (Queued):
Response (Running):
Response (Completed):
Response (Failed):

Deep Research Response Payload

When a task is submitted with force_research: true, the completed response includes additional metadata fields with structured research data.

Deep Research Metadata Fields

For Deep Research tasks, the metadata object contains:

Example: Deep Research Completed Response

Extracted Facts (Optional)

When enable_fact_extraction: true is set in the request context:

Citation Object Schema

The position of each citation in the metadata.citations array corresponds to the [n] index used in inline references.

Verification Object Schema

Accessing Deep Research Data: The metadata.citations array and metadata.verification object are only populated for research workflows (force_research: true). For simple tasks, these fields will be absent from the response.

Error Responses

401 Unauthorized

404 Not Found

500 Internal Server Error

Code Examples

Python - Simple Status Check

Python - Poll Until Completion

JavaScript/Node.js

JavaScript - Poll with Async/Await

Go

Bash - Monitor Task Progress

Use Cases

1. Submit and Wait Pattern

2. Dashboard Status Widget

3. Batch Status Check

Best Practices

1. Use Streaming Instead of Polling

For long-running tasks, use SSE streaming instead of polling:

2. Handle All Status States

3. Implement Exponential Backoff

4. Cache Status Responses

5. Extract Metadata

Submit Task

POST /api/v1/tasks

Stream Events

Real-time monitoring

Python SDK

Use client.get_status()

Notes

Don’t Poll in Production: For long-running tasks, use streaming endpoints instead of polling status. Polling creates unnecessary load and adds latency.
Session Tracking: The session_id field allows you to track which session a task belongs to, useful for multi-turn conversations and cost attribution.