Cancel Agent Response
POST
/
v1
/
agent
/
/
cancel
Cancel Agent Response
curl --request POST \
--url https://api.perplexity.ai/v1/agent/{id}/cancel \
--header 'Authorization: Bearer <token>'{
"response_id": "<string>",
"status": "cancelling"
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>"
}
}Authorizations
Section titled “Authorizations”Authorization
string
header
required
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Section titled “Path Parameters”id
string
required
Response id (resp_<...>)
Response
Section titled “Response”The cancel request was accepted; the run is being cancelled.
response_id
string
required
The response id (resp_<...>).
status
enum<string>
required
Always cancelling - the cancel was accepted and the run stops asynchronously. An already-terminal run returns 400 instead, so no terminal status appears here.
Available options:
cancelling
Was this page helpful?
⌘I