Overview
Kill an active task. By default, kill is graceful: the task entersstopping, ingest stops, and already-submitted renders are allowed to finish before terminal shutdown.
Send {"wait_for_renders": false} in the request body for immediate termination.
Only tasks with scheduled, queued, running, ready, or stopping status can be killed. Terminal tasks (stopped, error, failed, completed, cancelled) return a failure response.
Killing a scheduled task (an HLS pull created with scheduled_start_at whose worker has not launched yet) cancels it: the task becomes cancelled, no worker is ever started, and nothing is billed. wait_for_renders has no effect in that case.
Path Parameters
Request Body Parameters
Example Request (Default Graceful Kill)
Example Response (Graceful Kill Accepted)
Example Request (Immediate Kill)
Example Response (Immediate Kill)
Response Fields
Example Response (Scheduled Task Cancelled)
Response Examples
Already stopping (idempotent graceful kill)
Worker termination failed
If the worker could not be terminated, the API returns a500 error. The task remains active and continues to count against your concurrent task limit. The worker will automatically shut down when its maximum lifetime is exceeded.
Task not found or not owned by caller
Task already stopped
Notes
- Default behavior is graceful (
wait_for_renders=true): kill requests transition active tasks intostoppingand drain already-submitted renders. - Immediate behavior (
wait_for_renders=false) hard-stops the worker and may interrupt in-progress processing. - For
queuedtasks, kill stops immediately (there is no render queue to drain yet). - If worker termination fails in immediate mode, the API returns a
500error and the task remains active until automatic shutdown.

