Skip to main content

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 IDFamilyNotes
command-r-plus-08-2024Chat (default)Flagship
command-r-08-2024ChatMid-tier
command-r7b-12-2024ChatMost compact
command-a-reasoning-08-2025ReasoningReasoning traces
embed-english-v3.0Embeddings (def)1024 dim, English
embed-multilingual-v3.0Embeddings1024 dim, 100+ languages

CLI Usage

pnpm run cli generate "Explain RAG in 3 sentences" --provider cohere

Configuration Reference

Environment VariableRequiredDefault
COHERE_API_KEYYes
COHERE_MODELNocommand-r-plus-08-2024
COHERE_BASE_URLNohttps://api.cohere.com/compatibility/v1

Feature Support Matrix

FeatureSupport
Text generationYes
StreamingYes
Tool callingYes
Structured outputYes
VisionNo
EmbeddingsYes (native)
RerankingYes

Troubleshooting

  • Not Found — the chosen model may not be available on your tier. Try command-r-plus-08-2024 or command-r-08-2024.

See Also