Skip to content
Start Trading

Cancel Response

$ clst v1:omni-ai:responses cancel-response
DELETE/v1/omni-ai/responses/{response_id}

Cancel a queued or running response. Canceling a running response (Stop) also cancels every queued response in the thread that answers a user message. Canceling a queued response (withdraw) cancels only that response; the running response and other queued responses continue. Cancellation is idempotent after the response becomes terminal. Each canceled response still produces a finalized assistant message with outcome canceled in the thread history. Canceling a response that ended steered or merged follows its continued_in_response_id and stops the response that continues its work, with the same effect as Stop.

Authorization uses the linked account before any cancellation.

ParametersExpand Collapse
--response-id: string
--account-id: optional number

Lists only conversations for this account, or unlinked conversations when omitted. Other reads authorize the resource’s linked account. Omit when no account is selected; empty values and the string null are invalid.

ReturnsExpand Collapse
V1OmniAIResponseCancelResponseResponse: BaseResponse { metadata, error }
data: object { canceled }
canceled: boolean

Cancel Response

clst v1:omni-ai:responses cancel-response \
  --api-key 'My API Key' \
  --response-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
{
  "data": {
    "canceled": false
  },
  "metadata": {
    "request_id": "fa26a786-f5d3-48b0-80eb-778e17af4964"
  }
}
{
  "error": {
    "code": 400,
    "message": "account_id must be positive"
  },
  "metadata": {
    "request_id": "10f877f8-130b-4f02-b40a-1b6ab5d8acdf"
  }
}
{
  "error": {
    "code": 403,
    "message": "The caller does not have permission to execute the specified operation"
  },
  "metadata": {
    "request_id": "1c610eec-b873-4092-93aa-f14b6f501e4b"
  }
}
{
  "error": {
    "code": 404,
    "message": "Resource not found"
  },
  "metadata": {
    "request_id": "a5bc6ea6-1b72-4f31-bb7d-2bd57151decc"
  }
}
Returns Examples
{
  "data": {
    "canceled": false
  },
  "metadata": {
    "request_id": "fa26a786-f5d3-48b0-80eb-778e17af4964"
  }
}
{
  "error": {
    "code": 400,
    "message": "account_id must be positive"
  },
  "metadata": {
    "request_id": "10f877f8-130b-4f02-b40a-1b6ab5d8acdf"
  }
}
{
  "error": {
    "code": 403,
    "message": "The caller does not have permission to execute the specified operation"
  },
  "metadata": {
    "request_id": "1c610eec-b873-4092-93aa-f14b6f501e4b"
  }
}
{
  "error": {
    "code": 404,
    "message": "Resource not found"
  },
  "metadata": {
    "request_id": "a5bc6ea6-1b72-4f31-bb7d-2bd57151decc"
  }
}