Cohere Provider Guide
Command R chat + Embed v3 embeddings via the Cohere API
Overview
Cohere offers a production-grade chat
catalog (Command R / R+ / R7B) plus top-tier embeddings (Embed v3) and
reranking (Rerank v3). NeuroLink wraps chat via the OpenAI-compatible
endpoint and embeddings via the native /v2/embed endpoint.
Key Facts
- Protocol: OpenAI-compatible chat at
/compatibility/v1, native embed at/v2/embed - Default base URL:
https://api.cohere.com/compatibility/v1 - Default chat model:
command-r-plus-08-2024 - Default embed model:
embed-english-v3.0 - Streaming: Yes
- Tool calling: Yes (Command R / R+)
Quick Start
1. Get an API Key
https://dashboard.cohere.com/api-keys
2. Configure
COHERE_API_KEY=your-key
COHERE_MODEL=command-r-plus-08-2024
3. Generate Text
import { NeuroLink } from "@juspay/neurolink";
const ai = new NeuroLink();
const result = await ai.generate({
provider: "cohere",
input: { text: "Summarise the BM25 retrieval algorithm." },
});
console.log(result.content);
4. Generate Embeddings
const provider = await ai.getProvider("cohere");
const vec = await provider.embed("How does CRISPR work?");
console.log(vec.length); // 1024 for embed-english-v3.0
Supported Models
| Model ID | Family | Notes |
|---|---|---|
command-r-plus-08-2024 | Chat (default) | Flagship |
command-r-08-2024 | Chat | Mid-tier |
command-r7b-12-2024 | Chat | Most compact |
command-a-reasoning-08-2025 | Reasoning | Reasoning traces |
embed-english-v3.0 | Embeddings (def) | 1024 dim, English |
embed-multilingual-v3.0 | Embeddings | 1024 dim, 100+ languages |
CLI Usage
pnpm run cli generate "Explain RAG in 3 sentences" --provider cohere
Configuration Reference
| Environment Variable | Required | Default |
|---|---|---|
COHERE_API_KEY | Yes | — |
COHERE_MODEL | No | command-r-plus-08-2024 |
COHERE_BASE_URL | No | https://api.cohere.com/compatibility/v1 |
Feature Support Matrix
| Feature | Support |
|---|---|
| Text generation | Yes |
| Streaming | Yes |
| Tool calling | Yes |
| Structured output | Yes |
| Vision | No |
| Embeddings | Yes (native) |
| Reranking | Yes |
Troubleshooting
Not Found— the chosen model may not be available on your tier. Trycommand-r-plus-08-2024orcommand-r-08-2024.