Skip to content

job_cancel

Management

Cancel Job

Cancel a queued Scenario inference job. The backend cancels a job only when its jobType is "inference" and its status is still "queued"; every other job type is refused. If you already know the job's jobType and status (job_get, jobs_list), call this only for a queued inference job. A refusal is permanent for that job: do not retry, and tell the user it cannot be canceled — a running job runs to completion and needs no further call. Args: - job_id: required - team_id, project_id: required for OAuth callers Returns: the canceled job and its inference. Example: "Cancel this queued job" -> job_id="job_xxx" Don't use when: the job came from model_run, workflow_run or another tool of this server — those job types cannot be canceled. A training run (jobType ending in "training") is stopped with train action="stop" instead (catalog-only — run via scenario_tool_execute_write).
destructiveopen-world

Parameters

NameTypeRequiredDescription
job_idstring✓Job ID to cancel.
team_idstring—Team ID. Required with project_id for OAuth callers; an API key is scoped by the key.
project_idstring—Project ID. Required with team_id for OAuth callers; an API key is scoped by the key.
response_formatenum(json | markdown)jsonOutput format: 'json' for structured data, 'markdown' for human-readable text.

Example Request

JSON
{
  "job_id": "job_inf_123",
  "team_id": "team_abc123",
  "project_id": "proj_xyz789"
}

Example Response

JSON
{
  "job": {
    "jobId": "job_inf_123",
    "jobType": "inference",
    "status": "canceled"
  },
  "inference": {
    "id": "inf_abc123",
    "status": "canceled"
  }
}

Common Use Cases

  • Cancel a queued inference job before it starts