Skip to main content

Overview

Long-running operations like evaluations create tasks that run asynchronously.

Task States

StateDescription
pendingQueued for processing
runningCurrently executing
completedFinished successfully
failedEncountered an error
cancelledManually cancelled

Polling Tasks

task = client.tasks.get("task_abc123")
print(f"Status: {task.status}")
Use webhooks for real-time notifications instead of polling.