Skip to content

cancel_run

Cancel a pending or running model execution. Pass workspace_id to cancel a run in a workspace other than your current one (requires an active membership and a grant on the model there; OAuth/JWT sessions only) — the run must belong to that workspace and model. Returns: run_id (str) — cancelled run UUID; status (str) — always ‘cancelled’; model_name (str) — model name; message (str) — confirmation message; workspace_id (str) — the workspace the cancellation was resolved against.

NameTypeRequiredDefaultDescription
model_nameAnnotated[str, Field(description='Name of the model the run belongs to.')]Yes
run_idAnnotated[str, Field(description='Full UUID of the run to cancel. Must be in pending or running state.')]Yes
workspace_id`Annotated[strNone, Field(description=WORKSPACE_ID_FIELD_DESCRIPTION)]`NoNone

Returns a structured object. Top-level fields:

  • run_id (string)
  • status (string)
  • model_name (string)
  • message (string)

See the response example below for the full payload shape.

{
"name": "cancel_run",
"arguments": {
"model_name": "forecasts",
"run_id": "66666666-6666-6666-6666-666666666666"
}
}
{
"run_id": "66666666-6666-6666-6666-666666666666",
"status": "cancelled",
"model_name": "forecasts",
"message": "Run cancelled successfully."
}
  • Module: Execution
  • Requires authentication via API token or Auth0 JWT.