On Beam, each execution of a function creates a task. Tasks can be cancelled via API or the web UI. When a task is cancelled, it is stopped immediately. You will not be billed for any additional execution time after a task is stopped.

Any task can be cancelled through the API, or through the web dashboard.

Cancelling tasks through the API

Tasks can be cancelled through the api.beam.cloud/v1/task/cancel/ endpoint.

curl -X DELETE --compressed 'https://api.beam.cloud/v1/task/cancel/' \
  -H 'Authorization: Basic [YOUR_AUTH_TOKEN]' \
  -H 'Content-Type: application/json' \
  -d '{"task_ids": ["TASK_ID"]}'

This API accepts a list of tasks, which can be passed in like this:


Cancelling tasks through the dashboard

Tasks can also be cancelled in the dashboard. On the tasks page, click on an individual task.

A sidebar will open, and you will have the option to cancel the task.