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
      • POSTCheck API key
  • Deprecated
LogoLogodocs
DASHBOARDPLAYGROUNDDOCSCOMMUNITYLOG IN
Endpointsv1/check-api-key

Check API key

POST
https://api.cohere.com/v1/check-api-key
POST
/v1/check-api-key
1from cohere import Client
2
3client = Client(
4 token="YOUR_TOKEN_HERE",
5 client_name="my-cool-project",
6)
7
8client.check_api_key()
1{
2 "valid": true,
3 "organization_id": "org_9f8b7c6d5e4a3b2c1d0e",
4 "owner_id": "user_1234567890abcdef"
5}
Checks that the api key in the Authorization header is valid and active
Was this page helpful?
Previous

Classify

Next
Built with

Authentication

AuthorizationBearer

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

Headers

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

Response

OK
validboolean
organization_idstring
owner_idstring

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error
498
Invalid Token Error
499
Client Closed Request Error
500
Internal Server Error
501
Not Implemented Error
503
Service Unavailable Error
504
Gateway Timeout Error