GET
/
tasks
/
{task_id}

The Get Task Status endpoint allows you to check the current status of a task, such as content indexing or processing. This is particularly useful for long-running operations like video processing, where you might need to poll the status periodically to determine when the task is complete.

Request

task_id
string
required

The unique identifier of the task

Response

file_id
string

The ID of the file associated with the task

task_id
string

The unique identifier of the task

status
string

The current status of the task

Task Status Meanings

The status field can have one of the following values:

StatusMeaning
INITIALIZINGThe task has been created and is in the initial setup phase.
PROCESSINGThe task is actively being worked on.
DONEThe task has completed successfully.
FAILEDThe task encountered an error and could not be completed.

Why Poll for Status?

Polling the task status is essential for operations that may take a significant amount of time to complete, such as:

  1. Video processing and indexing
  2. Large file uploads
  3. Complex data analysis tasks
  4. Batch operations on multiple items

By periodically checking the task status, you can:

  • Provide progress updates to your users
  • Trigger subsequent actions once a task is complete
  • Handle errors or failures gracefully
  • Manage resources efficiently by knowing when a task is finished

Remember to implement appropriate polling intervals and error handling in your application when using this endpoint.