agentsclimarketplace

Cohere install auth

Skill jeremylongshore/claude-code-plugins-plus-skills/plugins/saas-packs/cohere-pack/skills/cohere-install-auth

'Install and configure Cohere SDK authentication with API v2.From its SKILL.md

Install
npx -y skills add jeremylongshore/claude-code-plugins-plus-skills --skill cohere-install-auth

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

4.0 KB, 991 tokens by cl100k_base, as published. Nobody here has run it

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

# Node.js / TypeScript
npm install cohere-ai

# Python
pip install cohere

Step 2: Configure API Key

# Set environment variable
export CO_API_KEY="your-api-key-here"

# Or create .env file (add .env to .gitignore!)
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: 'user', content: 'Say "connection verified" and nothing else.' },
    ],
  });
  console.log('Status:', response.message?.content?.[0]?.text);
}

verify().catch(console.error);

Step 4: Verify Connection (Python)

import cohere
import os

co = cohere.ClientV2(api_key=os.environ.get("CO_API_KEY"))

response = co.chat(
    model="command-a-03-2025",
    messages=[
        {"role": "user", "content": "Say 'connection verified' and nothing else."}
    ],
)
print("Status:", response.message.content[0].text)

Available Models

ModelIDContextBest For
Command Acommand-a-03-2025256KLatest, most capable
Command R+command-r-plus-08-2024128KComplex RAG, agents
Command Rcommand-r-08-2024128KRAG, cost-effective
Command R7Bcommand-r7b-12-2024128KFast, lightweight
Embed English v4embed-v4.0128KEmbeddings (EN)
Embed Multilingual v3embed-multilingual-v3.0512Embeddings (100+ langs)
Rerank v3.5rerank-v3.54KSearch reranking

Output

  • Installed cohere-ai (TS) or cohere (Python) package
  • Environment variable CO_API_KEY configured
  • Verified API connectivity with a chat completion

Error Handling

ErrorCauseSolution
CohereApiError: invalid api tokenWrong or expired keyRegenerate at dashboard.cohere.com
CohereConnectionErrorNetwork blockedEnsure HTTPS to api.cohere.com allowed
429 Too Many RequestsTrial rate limit hitWait 60s or upgrade to production key
MODULE_NOT_FOUND cohere-aiPackage not installedRun npm install cohere-ai

SDK Auto-Detection

The SDK reads CO_API_KEY automatically if set. You can skip the token param:

// Auto-reads CO_API_KEY from environment
const cohere = new CohereClientV2();

Resources

Next Steps

After successful auth, proceed to cohere-hello-world for your first real API call.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,144. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.