For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DASHBOARDPLAYGROUNDDOCSCOMMUNITYLOG IN
Guides and conceptsAPI ReferenceRelease NotesLLMUCookbooks
Guides and conceptsAPI ReferenceRelease NotesLLMUCookbooks
  • Cohere API
    • About
    • Teams and Roles
    • Errors
    • Migrating From API v1 to API v2
    • Using the OpenAI SDK
  • Endpoints
      • POSTCreate a batch
      • GETList batches
      • GETRetrieve a batch
      • POSTCancel a batch
  • Deprecated
LogoLogodocs
DASHBOARDPLAYGROUNDDOCSCOMMUNITYLOG IN
Endpointsv2/batches

Cancel a batch

POST
https://api.cohere.com/v2/batches/:id:cancel
POST
/v2/batches/:id:cancel
1import cohere
2
3co = cohere.ClientV2()
4
5batch_job = co.batches.cancel("<batch_job_id>")
1{}

Cancels an in-progress batch

Was this page helpful?
Previous

Create a Dataset

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

idstringRequired
The batch ID.

Headers

X-Client-NamestringOptional
The name of the project that is making the request.

Response

A successful response.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error
503
Service Unavailable Error