Skip to main content
POST
Cancel a running task
Rows that already finished keep their results. Read them with Get task status after cancelling — the data array holds only the finished rows, so unlike a completed bulk run it is not aligned to your inputs and cannot be joined back by position.
Credits reserved by requests that had not finished are returned. You are only billed for the rows that produced data.
A task that has already reached a terminal status (completed, partially_completed, failed) returns 409. Provider calls already in flight for a waterfall row may still finish, but you are not billed for them.

Headers

x-apikey
any
required

API Key for authentication

Path Parameters

task_id
string
required

The unique identifier of the task to cancel.

Response

The task was cancelled.

task_id
string
required

Unique identifier of the task.

status
string
required

Current status of the request. Can be 'processing', 'completed', 'partially_completed', 'failed' or 'cancelled'.

request_id
string | null
deprecated

Deprecated: use task_id instead. Same value as task_id.

progress
Progress · object | null

How far a bulk run has got: total, completed, failed and processing counts of inputs. failed covers every finished input that produced no data, clean misses included. Omitted for single (non-bulk) runs.

data

Resulting data once completed. For bulk runs this is an array aligned to the inputs: one element per input, in the same order they were submitted, with null for inputs that returned no data (len(data) equals the number of inputs, and data[i] is the result for input i). A single (non-bulk) run returns the result object directly.

error

Error message if the request has failed.

credits_spent
number
default:0

Total credits spent for this request.