Skip to main content
Cohere

Search documentation

Type to search this documentation.

Cancel a batch

POST/v2/batches/{id}:cancelCancel a batch

Cancels an in-progress batch

Parameters

idstringpathrequired

The batch ID.

X-Client-Namestringheader

The name of the project that is making the request.

Responses

200A successful response.application/json
objectCancelBatchResponse

Response to a request to cancel a batch.

Example response
{}
400Bad Requestapplication/json
objectBatchError

Error is the response for any unsuccessful event.

messagestring

A developer-facing error message.

Example response
{
  "message": "string"
}
401Unauthorizedapplication/json
objectBatchError

Error is the response for any unsuccessful event.

messagestring

A developer-facing error message.

Example response
{
  "message": "string"
}
403Forbiddenapplication/json
objectBatchError

Error is the response for any unsuccessful event.

messagestring

A developer-facing error message.

Example response
{
  "message": "string"
}
404Not Foundapplication/json
objectBatchError

Error is the response for any unsuccessful event.

messagestring

A developer-facing error message.

Example response
{
  "message": "string"
}
500Internal Server Errorapplication/json
objectBatchError

Error is the response for any unsuccessful event.

messagestring

A developer-facing error message.

Example response
{
  "message": "string"
}
503Status Service Unavailableapplication/json
objectBatchError

Error is the response for any unsuccessful event.

messagestring

A developer-facing error message.

Example response
{
  "message": "string"
}
Documentation menu