| name | cohere-install-auth |
| description | Install and configure Cohere SDK authentication with API v2.
Use when setting up a new Cohere integration, configuring API keys,
or initializing the CohereClientV2 in your project.
Trigger with phrases like "install cohere", "setup cohere",
"cohere auth", "configure cohere API key".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Bash(pip:*), Grep |
| version | 1.5.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","ai","nlp","cohere"] |
| compatibility | Designed for Claude Code |
Cohere Install & Auth
Overview
Set up the Cohere SDK (v2) and configure authentication for Chat, Embed, Rerank, and Classify endpoints.
Prerequisites
- Node.js 18+ or Python 3.10+
- Package manager (npm, pnpm, or pip)
- Cohere account at dashboard.cohere.com
- API key from Cohere dashboard (trial keys are free, production keys require billing)
Instructions
Step 1: Install SDK
npm install cohere-ai
pip install cohere
Step 2: Configure API Key
export CO_API_KEY="your-api-key-here"
echo 'CO_API_KEY=your-api-key-here' >> .env
Key types:
- Trial key — free, rate-limited (5-20 calls/min per endpoint, 1000/month others)
- Production key — metered billing, 1000 calls/min all endpoints, unlimited monthly
Step 3: Verify Connection (TypeScript)
import { CohereClientV2 } from 'cohere-ai';
const cohere = new CohereClientV2({
token: process.env.CO_API_KEY,
});
async function verify() {
const response = await cohere.chat({
model: 'command-a-03-2025',
messages: [
{ role: , : },
],
});
.(, response.?.?.[]?.);
}
().(.);