Cohere API
by docs.cohere.com
AI models and chat
Added on October 31st, 2026
Checked and working on October 31st, 2026
Visit docs.cohere.com →
What it does
Cohere offers language AI for businesses: the Command models for chat and text generation, Embed for turning text into vectors for semantic search, and Rerank for ordering search results by relevance, all in more than 100 languages. Use the REST API or the SDKs for Python, TypeScript, Java and Go. Free trial key without a time limit, limited to 1,000 calls per month and a per-minute rate limit; production use needs a paid key.
At a glance
- API key
- Needed, free · More APIs with a free key
- Pricing
- Free trial key without a time limit, limited to 1,000 calls per month and a per-minute rate limit; production use needs a paid key.
- From the browser
- Yes (CORS)
- Formats
- JSON
- Interface
- REST
- Provider
- docs.cohere.com
- Last checked
- Working on October 31st, 2026
More information: https://docs.cohere.com/
Is this your service? Show that it is listed
Put this badge on your website or in your README; it links to this page. About the badge
Example request
curl
curl -X POST 'https://api.cohere.com/v2/chat' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"model": "command-a-plus-05-2026", "messages": [{"role": "user", "content": "hello"}]}'
JavaScript
const response = await fetch("https://api.cohere.com/v2/chat", {
method: 'POST',
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({"model":"command-a-plus-05-2026","messages":[{"role":"user","content":"hello"}]}),
});
const data = await response.json();
console.log(data);
Python
import requests
response = requests.post(
"https://api.cohere.com/v2/chat",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"model": "command-a-plus-05-2026",
"messages": [
{
"role": "user",
"content": "hello",
},
],
},
timeout=30,
)
print(response.json())
Replace YOUR_API_KEY with your own key. The JavaScript works in a web page as well as in Node.js 18 or newer.