Cohere

cohere

Aliases: command

YAML config

providers:
  - id: cohere:command-r-plus
    config:
      apiKey: ${COHERE_API_KEY}

TypeScript usage

import { createProvider } from "@evalguard/core";

const provider = createProvider("cohere", process.env.COHERE_API_KEY);
const response = await provider.complete({
  model: "command-r-plus",
  messages: [{ role: "user", content: "Hello" }],
});

Authentication

Set COHERE_API_KEY in your environment. EvalGuard validates the key on first call and surfaces typed errors for 401 / 403 / rate-limit responses (with Retry-After parsing).

Setup walkthrough

  1. 1. Sign up for a Cohere account at their official website.
  2. 2. Obtain your API key from the dashboard after logging in.
  3. 3. Install the Cohere SDK using pip: `pip install cohere`.
  4. 4. Initialize the Cohere client in your application using the API key.
  5. 5. Test the connection by making a simple request to generate text.

Gotchas

  • Cohere's API has a rate limit of 60 requests per minute, which can be restrictive for high-volume applications.
  • Some models may not be available in certain regions due to compliance and regulatory issues.
  • Ensure that you handle API key security properly, as exposing it can lead to unauthorized usage.

Cost note

Cohere charges $0.75 per million tokens for their flagship model (Command R) and $0.50 for the cheapest model (Command).

Recommended models

Eval / judge
command-xlarge-20221108
Agent / tool-use
command-xlarge-20221108
Code
command-codex-20221108
Vision
N/A

LLM-generated (llm-gpt-4o) · 2026-05-23