Skip to main content

Overview

Cohere provides enterprise-grade language models specialized for business applications, including powerful chat models, best-in-class embeddings, and reranking capabilities. Access Cohere through Portkey for production-ready NLP. Base URL: https://api.cohere.ai

Supported Features

  • ✅ Chat Completions (v2 API)
  • ✅ Streaming
  • ✅ Embeddings
  • ✅ Rerank (via Cohere API)
  • ✅ Tool Use (Function Calling)
  • ✅ Document Mode (RAG)
  • ✅ Citation Mode
  • ✅ Batch Embeddings
  • ❌ Image Generation
  • ❌ Vision

Quick Start

Chat Completions

Streaming

Available Models

Chat Models

Embedding Models

Cohere excels at:
  • Enterprise deployments with strong support
  • RAG applications with citation support
  • Multilingual tasks (100+ languages)
  • Semantic search with best-in-class embeddings
  • Document grounding for factual responses

Configuration Options

Headers

Advanced Features

Tool Use (Function Calling)

RAG with Document Grounding

Cohere excels at RAG with built-in citation support:

Embeddings

Batch embeddings:

Embedding Input Types

Optimize embeddings for your use case:

Legacy Completions API

For older command models:

Fallback Configuration

Fallback to GPT-4 if Cohere fails:

Load Balancing

Balance between Command R+ and Command R:

Error Handling

Best Practices

  1. Use RAG mode - Leverage document grounding for factual accuracy
  2. Enable citations - Track sources for enterprise use
  3. Choose right embedding type - Use appropriate input_type for embeddings
  4. Use Command R+ - For complex tasks requiring reasoning
  5. Use Command R - For cost-effective general purpose tasks
  6. Batch embeddings - More efficient than individual requests
  7. Implement streaming - Better UX for long responses
  8. Handle tool calls - Multi-step reasoning with function calling

Enterprise Features

  • Data privacy: Cohere doesn’t train on customer data
  • Regional deployment: Available in multiple regions
  • SOC 2 Type II: Enterprise compliance
  • Custom deployments: Private cloud options
  • SLA support: Enterprise support plans
  • Fine-tuning: Custom model training

Pricing

Cohere offers competitive pricing with a free trial:

Cohere Pricing

View detailed pricing for all Cohere models

Embeddings Guide

Working with embeddings

RAG Guide

Building RAG applications

Function Calling

Tool use and function calling

Fallbacks

Fallback configurations