Skip to main content
Cohere
current

Search documentation

Type to search this documentation.

Get Started

Welcome to Cohere

Find the right Cohere product: the Platform for direct API access, Model Vault for dedicated deployments, or North for a ready-made agentic AI solution.

All Markup Examples

Examples for all types of markup/elements supported on ReadMe

/chat

Chat

|-

/check-api-key

Check API key

Checks that the api key in the Authorization header is valid and active

/classify

Classify

|-

/connectors

Create a Connector

Creates a new connector. The connector is tested during registration and will cancel registration when the test is unsuccessful. See 'Creating and Deploying a Connector' for more information.

Delete a Connector

Delete a connector by ID. See 'Connectors' for more information.

Get a Connector

Retrieve a connector by ID. See 'Connectors' for more information.

List Connectors

Returns a list of connectors ordered by descending creation date (newer first). See 'Managing your Connector' for more information.

Authorize with oAuth

Authorize the connector with the given ID for the connector oauth app. See 'Connector Authentication' for more information.

Update a Connector

Update a connector by ID. Omitted fields will not be updated. See 'Managing your Connector' for more information.

/datasets

Create a Dataset

Create a dataset by uploading a file. See 'Dataset Creation' for more information.

Delete a Dataset

Delete a dataset by ID. Datasets are automatically deleted after 30 days, but they can also be deleted manually.

Get Dataset Usage

View the dataset storage usage for your Organization. Each Organization can have up to 10GB of storage across all their users.

Get a Dataset

Retrieve a dataset by ID. See 'Datasets' for more information.

List Datasets

List datasets that have been created.

/detokenize

Detokenize

This endpoint takes tokens using byte-pair encoding and returns their text representation. To learn more about tokenization and byte pair encoding, see the tokens page.

/embed-jobs

Cancel an Embed Job

This API allows users to cancel an active embed job. Once invoked, the embedding process will be terminated, and users will be charged for the embeddings processed up to the cancellation point. It's important to note that partial results will not be available to users after cancellation.

Create an Embed Job

This API launches an async Embed job for a Dataset of type embed-input. The result of a completed embed job is new Dataset of type embed-output, which contains the original text entries and the corresponding embeddings.

Fetch an Embed Job

This API retrieves the details about an embed job started by the same user.

List Embed Jobs

The list embed job endpoint allows users to view all embed jobs history for that specific user.

/embed

Embed

|-

/finetuning

Trains & deploys a fine-tuned model

Deletes a fine-tuned model.

Returns a fine-tuned model by ID.

Retrieves the chronology of statuses the fine-tuned model has been through.

Lists fine-tuned models.

Retrieves metrics measured during the training of a fine-tuned model.

Updates a fine-tuned model.

/generate

Archive api reference generate generate 1

/models

Get a Model

Returns the details of a model, provided its name.

List Models

Returns a list of models available for use. The list contains models from Cohere as well as your fine-tuned models.

/rerank

Rerank

This endpoint takes in a query and a list of texts and produces an ordered array with each text assigned a relevance score.

/summarize

Archive api reference summarize 1 summarize 2

/tokenize

Tokenize

This endpoint splits input text into smaller units called tokens using byte-pair encoding (BPE). To learn more about tokenization and byte pair encoding, see the tokens page.

Chat API

This document provides a guide on using the Chat endpoint to create a Chatbot that responds to input queries considering previous context. It covers setting up the SDK, defining model settings, generating responses, and various ways of using the Chat endpoint, including interacting directly, continuing conversations, and using document and connector modes. It also explains streaming responses from the Chat endpoint and provides next steps for building products.

Translating Text with Command A Translate

This page describes how to use cohere Chat API with list_calendar_events and create_calendar_event tools to book appointments.

Top-k & Top-p

This document discusses different decoding strategies for generating text with language models, focusing on top-k sampling and top-p sampling to pick output tokens based on likelihood scores.

Conversational AI

Customer Support

Data Statement

The document discusses two datasets, coheretext-filtered and coheretext-unfiltered, developed by the Cohere Infrastructure Team. The unfiltered dataset is used to train Representation models reflecting the world, while the filtered dataset is used to train Generation models with a focus on minimizing harmful generations. Cohere is committed to responsible data collection and curation to prevent harm and bias in their language models.

Dataset (API)

Dataset (SDK)

Deploying with Amazon SageMaker

In this chapter, you'll learn how to deploy a Cohere model in AWS SageMaker, enabling use cases that require private LLM deployments.

Environmental Impact

This document discusses training large language models on Google Cloud, which has net zero emissions and aims to be 100% renewable by 2030. It also reports carbon emissions per model training run using the ML CO2 Impact Tool.

Fine-tuning for Cohere's Chat Model

This document provides guidance on fine-tuning, evaluating, and improving chat models.

Improving the Chat Fine-tuning Results

Learn how to refine data, iterate on hyperparameters, and troubleshoot to fine-tune your Chat model effectively.

Preparing the Chat Fine-tuning Data

Prepare your data for fine-tuning a Command model for Chat with this step-by-step guide, including data formatting, requirements, and best practices.

Starting the Chat Fine-Tuning Run

Learn how to fine-tune a Command model for chat with the Cohere Web UI or Python SDK, including data requirements, pricing, and calling your model.

Understanding the Chat Fine-tuning Results

Learn how to evaluate and troubleshoot a fine-tuned chat model with accuracy and loss metrics.

Fine-tuning for Cohere's Classify Model

This document provides guidance on fine-tuning, evaluating, and improving classification models.

Improving the Classify Fine-tuning Results

Troubleshoot your fine-tuned classification model with these tips for refining data quality and improving results.

Preparing the Classify Fine-tuning data

Learn how to prepare your data for fine-tuning classification models, including single-label and multi-label data formats and dataset cleaning tips.

Training and deploying a fine-tuned Cohere model.

Fine-tune classification models with Cohere's Web UI or Python SDK using custom datasets. (V1)

Understanding the Classify Fine-tuning Results

Understand the performance metrics for a fine-tuned classification model and learn how to interpret its accuracy, precision, recall, and F1 scores.

Fine-tuning on AWS

This document provides guidance on optimizing Cohere's generative models within the AWS environment.

Fine-tuning Cohere Models on Amazon Bedrock

This document provides instructions on how to fine-tune Cohere's generative models on AWS Bedrock, including data preparation, starting the fine-tuning job, and improving the fine-tuned model. It also explains how to use the Cohere AWS SDK for programmatic fine-tuning.

Fine-tuning Cohere Models on Amazon SageMaker

Fine-tuning with Cohere's Dashboard

Use the Cohere Web UI to start the fine-tuning jobs and track the progress.

Programmatic Fine-tuning

Fine-tune models using the Cohere Python SDK programmatically and monitor the results through the Dashboard Web UI.

Fine-tuning for Cohere's Rerank Model

This document provides guidance on fine-tuning, evaluating, and improving rerank models.

Improving the Rerank Fine-tuning Results

Tips for achieving the best fine-tuned rerank model and troubleshooting guide for fine-tuned models.

Preparing the Rerank Fine-tuning Data

Learn how to prepare and format your data for fine-tuning Cohere's Rerank model.

Starting the Rerank Fine-Tuning

How to start training a fine-tuning model for Rerank using both the Web UI and the Python SDK.

Understanding the Rerank Fine-tuning Results

Understand how fine-tuned models for Rerank are evaluated, and learn about the specific metrics used, including Accuracy, MRR, and nDCG.

FAQs for Troubleshooting A Fine-Tuned Model

Train custom AI models with Cohere's platform and leverage human evaluations to compare model performances.

Preparing the Chat Fine-tuning Data

Prepare your data for fine-tuning a Command model for Chat with this step-by-step guide, including data formatting, requirements, and best practices.

Starting the Chat Fine-Tuning Run

Learn how to fine-tune a Command model for chat with the Cohere Web UI or Python SDK, including data requirements, pricing, and calling your model.

Preparing the Classify Fine-tuning data

Learn how to prepare your data for fine-tuning classification models, including single-label and multi-label data formats and dataset cleaning tips.

Train and deploy a fine-tuned model.

Fine-tune classification models with Cohere's Web UI or Python SDK using custom datasets. (V2)

Programmatic Fine-tuning with Cohere's Python SDK

Fine-tune models using the Cohere Python SDK programmatically and monitor the results through the Dashboard Web UI.

Preparing the Rerank Fine-tuning Data

Learn how to prepare and format your data for fine-tuning Cohere's Rerank model.

Starting the Rerank Fine-Tuning

How to start training a fine-tuning model for Rerank using both the Web UI and the Python SDK.

Fine-tuning for Generate

This document provides guidance on fine-tuning, evaluating, and improving generative models.

Improving the Generate Fine-tuning results

This document provides tips for refining data quality, iterating on hyperparameters, and troubleshooting issues with fine-tuned generative models. It emphasizes the importance of adding specific examples, checking for errors in data, and using real data for training.

Preparing the Generate Fine-tuning Data

This document provides guidance on preparing data for fine-tuning a model for Generate, including data format, cleaning the dataset, and adding evaluation datasets using the Python SDK.

Starting the Generate Fine-tuning

This document provides a step-by-step guide on how to create a fine-tuned generative model using the Cohere Dashboard, including choosing the generate option, uploading data, reviewing data samples, and starting the training process.

Understanding the Generate Fine-tuning Results

This document explains the metrics for a fine-tuned model for Generate, including accuracy, loss, and assessing performance with likelihoods. It suggests playing around with the model in the playground and evaluating its performance qualitatively.

Generation Benchmarks

This page describes various benchmarks associated with Cohere's generation models.

Introduction

This page will help you get started with Cohere Test. You'll be up and running in a jiffy!

Going Live

REMOVE How to Evaluate a Classifier

One of an ML practitioner's most critical tasks is evaluating the model's performance. This is a crucial step because it demonstrates the level of quality and readiness of the model to perform in production environments. This section will teach you the various metrics used to evaluate a classification model. These metrics will help you track overfitting or underfitting scenarios, leading to improved model quality.

Intent Recognition

/v1/classify

A helpful AI assistant is ready to assist users with any queries and offer thorough responses.

Building An Intent Recognition Classifier

Learn how to set up a chatbot to categorize customer inquiries using the Cohere SDK.

Introduction to Large Language Models

The document discusses the importance of language and the limitations of current software in understanding it.

Landing Page HTML (archived)

Language Detection

Appendix 2: Building Apps

App Examples

Module 4: Deployment

Deploying on Google Sheets with Google Apps Script

In this chapter, you'll learn how to add text classification and summarization features in Google Sheets using Google Apps Script.

Deploying as a Chrome Extension

In this chapter, you'll learn how to create a Google Chrome extension that summarizes the text content of a web page.

Deploying with Databutton

In this chapter you'll learn how to create a topic modeling application using Databutton.

Deploying with FastAPI

In this chapter, you'll learn how to build a sentiment analysis classifier and deploy it with FastAPI.

Deploying with Streamlit

In this chapter you'll learn how to build and deploy an app using Streamlit, one of the fastest and simplest options to get started.

Conclusion

Module 1: What are Large Language Models?

Conclusion - Large Language Models

Semantic Search

Semantic search is a very effective way to search documents with a query. In this chapter, you’ll learn how to use embeddings and similarity in order to build a semantic search model.

(Deprecated) Similarity Between Words and Sentences

Learn when two pieces of text are similar or different.

Similarity Between Words and Sentences

Learn when two pieces of text are similar or different.

Text Embeddings

Word and sentence embeddings are the bread and butter of language models. This chapter shows a very simple introduction to what they are.

The Attention Mechanism

A huge roadblock for language models is when a word can be used in two different contexts. When this problem is encountered, the model needs to use the context of the sentence in order to decipher which meaning of the word to use. For this, LLMs use the Attention Mechanism, which is the topic of this chapter.

Transformer Models

Transformers are a new development in machine learning that have been making a lot of noise lately. They are incredibly good at keeping track of context, and this is why the text that they write makes sense. In this chapter, we will go over their architecture and how they work.

Appendix: NLP and ML Fundamentals

Applications of NLP

In this chapter you'll learn some important applications of Natural language Processing.

History of NLP

How to Build a Classifier

In ML, a classifier is a model whose task is to assign a category or class to input data. You can use supervised or unsupervised models. Supervised classifiers use labeled data and can only assign categories based on the training data. Unsupervised classifiers use pattern recognition techniques to split the input data into categories.This chapter will teach you the steps behind building a simple supervised classification model.

How to Convert Text Into Vectors

This chapter teaches you about vectorization, which are processes used to turn text into numbers for the ML model to process.

How to Evaluate a Classifier

One of an ML practitioner's most critical tasks is evaluating the model's performance. This is a crucial step because it demonstrates the level of quality and readiness of the model to perform in production environments. This section will teach you the various metrics used to evaluate a classification model. These metrics will help you track overfitting or underfitting scenarios, leading to improved model quality.

Conclusion - NLP

Past Machine-Learning Methods of NLP

This chapter explores some of the traditional methods used in NLP, including rule-based systems and statistical models.

Text Pre-Processing in NLP

In this chapter you'll learn about how to pre-process text in order to get it ready for the model to process.

Module 6: Prompt Engineering

Chaining Prompts

In this chapter, you'll learn about several prompt-chaining patterns and their example applications.

Conclusion - Prompt Engineering

Constructing Prompts

In this chapter, you'll learn about the different techniques for constructing prompts for the Command model.

Evaluating Outputs

In this chapter, you'll learn about the different techniques for evaluating LLM outputs.

Use Case Patterns

In this chapter, you'll learn about the common use case patterns in text generation, including prompt examples.

Validating Outputs

In this chapter, you'll learn how to implement validation on LLM outputs.

Module 5: Semantic Search

A Deeper Dive Into Semantic Search

In this chapter, you'll dive deeper into building a semantic search model using the Embed endpoint. You'll use this model to search for answers in a large text dataset.

Dense Retrieval

Evaluation Methods for Search

Fine-Tuning for Rerank

Further Reading

Generating Answers

Keyword Search

ReRanking

Conclusion - Semantic Search

Vector Databases and Nearest Neighbor Search

What is Semantic Search?

Semantic search is a very effective way to search documents with a query. In this chapter, you’ll learn how to use embeddings and similarity in order to build a semantic search model.

Wikipedia Embeddings

Module 3: Text Generation

Building a Chatbot

In this chapter, you’ll learn how to build a chatbot from scratch using the Chat endpoint, and you’ll explore features like defining preambles, streaming, and state management.

Chaining Prompts

In this chapter, you'll learn how to concatenate multiple endpoints in order to generate text. You'll apply this by creating a story.

Conclusion - Text Generation

Fine-tuning a Generative Model

In this chapter you'll learn how to train custom models on top of the baseline generative model to specialize on specific tasks.

Fine-Tuning for Chat

In this chapter, you’ll learn how to fine-tune the Chat endpoint model on custom datasets, enhancing its performance on specific tasks.

Introduction to RAG

In this chapter, you’ll learn how to connect LLMs to external knowledge sources, enhancing the accuracy and relevance of chatbot responses.

Introduction to Text Generation

In this chapter, you’ll learn about Cohere’s Command model and how an LLM chatbot works, and get an introduction to Cohere’s Chat endpoint.

Prompt Engineering

In this chapter, you'll learn how to use the Cohere Playground and the basics of constructing good prompts for generative models.

Parameters for Controlling Outputs

In this chapter, you’ll learn about the parameters that you can leverage to ​​control the Chat endpoint's outputs.

Prompt Engineering Basics

In this chapter, you’ll learn the basics of prompt engineering and how to craft effective prompts to obtain desirable outputs for various tasks.

Conclusion

Cohere's Command Model

World-Class AI, at your Command

The Generate Endpoint

In this chapter, you'll learn how to use the Cohere Generate endpoint, and use it to generate responses to different prompts.

Use Case Ideation

In this chapter you'll learn the main types of use-cases of generative language models, and some real-life examples of them.

What is Generative AI?

Module 2: Text Representation

Classification Models

Large language models are used to solve all kinds of language tasks. Text classification is one of the leading tasks these models are often deployed to solve. For developers new to classification, a text classifier can be thought of as a piece of software that looks at a piece of text and assigns it a class label. With this knowledge, we can look around and think about how this capability can enhance the systems we build. Let's look at two examples: Customer service and content moderation.

Classification Using Embeddings

In a previous chapter, you learned how to classify text using the Classify endpoint. However, there are more ways to classify text, and one of them is using embeddings! In this chapter you'll learn how.

The Classify Endpoint

In this chapter you'll learn how to classify a small dataset of sentences by their sentiment (positive, negative, or neutral), using Cohere's Classify endpoint

Topic Modeling

In this chapter, you'll learn how to map a large dataset of 10,000 Hacker News posts using the Embed endpoint. You'll also be able to cluster the posts and extract keywords from each cluster.

Clustering Using Embeddings

Now that you've learned what embeddings are, here is another very important application of embeddings, which is clustering. In this chapter, you'll continue with the same dataset as before, you'll split it into different clusters using K-means clustering, and you'll observe that these clusters contain similar sentences.

Clustering With Embeddings

In this chapter, you'll leverage embeddings and K-means clustering to split a text dataset into different clusters with semantically similar sentences.

The Embed Endpoint

In this chapter, you'll learn how to use embeddings and Cohere's Embed endpoint to explore and get insights on a dataset of sentences

Visualizing Data

In the previous chapter you learned about the Embed endpoint. Over the next few chapters, you'll see a more in-depth analysis of these embeddings, as well as some code to put them in practice for different tasks such as semantic search, clustering, and classification.

Classification Evaluation Metrics

Learn how to evaluate classification models.

Few-Shot Classification

In this chapter, you'll learn how to classify a small dataset of sentences by their sentiment (positive, negative, or neutral), using Cohere's Classify endpoint.

Fine-Tuning for Classification

In this chapter, you'll learn how to fine-tune the Classify endpoint model on custom datasets, enhancing its performance on specific tasks.

Fine-tuning an Embedding Model for Classification

Now that you've learned several applications of embeddings, here is a very important tool called finetuning, which is a very useful way to adapt the model to our particular dataset.

Introduction to Semantic Search

In this chapter, you'll learn how to use text embeddings to search for the answer to a given query among the sentences in a dataset. Since the embedding takes semantics into account, this process is called semantic search.

Introduction to Text Embeddings

In this chapter, you'll learn how to use embeddings and Cohere's Embed endpoint to explore and get insights on a dataset of sentences

Multilingual Sentiment Analysis

In this chapter, we will build a sentiment analysis application that can classify sentiments in text from multiple languages.

Semantic Search Using Embeddings

In the previous chapter you used an embedding to visualize a dataset of sentences. In this chapter, you'll learn how to use this embedding to search for the answer to a given query among the sentences in this dataset. Since the embedding takes semantics into account, this process is called semantic search. If you need a refresher, please check the semantic search chapter in Module 2.

Setting up

Setting up the Cohere platform

Text Classification

In this chapter, you'll learn about different applications for classification models, along with how to evaluate their performance.

Conclusion - Text Representation

Module 7: The Cohere Platform

Applications

In this chapter, you'll get an overview of the applications that can be built with Cohere.

Conclusion - The Cohere Platform

Test

Endpoints

In this chapter, you'll get an overview of Cohere's API endpoints.

Foundational Models

In this chapter, you'll get an overview of Cohere's foundation models.

Serving Platform

In this chapter, you'll get an overview of Cohere's serving platform.

Welcome to LLM University!

LLM University (LLMU) offers in-depth, practical NLP and LLM training. Ideal for all skill levels. Learn, build, and deploy Language AI with Cohere.

Discord and Community

Structure of the Course

Your Instructors

Module 7: Retrieval-Augmented Generation (RAG)

REMOVE The Embed Endpoint

Intro to the Cohere Endpoints: Classify, Embed, Search. From https://cohere.com/blog/hello-world-p2/

REMOVE Introduction

REMOVE: How to Use Cohere's Endpoints

Intro to the Cohere Endpoints: Classify, Embed, Search. From https://cohere.com/blog/hello-world-p2/

REMOVE Semantic Search Text Using Embeddings

Intro to the Cohere Endpoints: Classify, Embed, Search. From https://cohere.com/blog/hello-world-p2/

REMOVE Three tasks: Classify, Analyze, Generate

Intro to the Cohere Endpoints: Classify, Embed, Search. From https://cohere.com/blog/hello-world-p2/

HOLD OFF Building and Deploying a Discord Bot

In this chapter you'll learn to build and deploy a bot that answers questions in Discord.

REMOVE Entity Extraction

In this chapter you'll learn how to use the generate endpoint to extract information from text. You'll apply it to a dataset of Reddit posts about movies. From each post, the model will extract the title of the movie it is about.

Classification Models

Large language models are used to solve all kinds of language tasks. Text classification is one of the leading tasks these models are often deployed to solve. For developers new to classification, a text classifier can be thought of as a piece of software that looks at a piece of text and assigns it a class label. With this knowledge, we can look around and think about how this capability can enhance the systems we build. Let's look at two examples: Customer service and content moderation.

BAK MEOR Creating Custom Generative Models

In this chapter you'll learn how to train models on top of the baseline generative model, in order to solve specific problems.

REMOVE Introduction

REMOVE Document Question Answering

/page/document-question-answering

DEPRECATE Generate Conversations with Next.js

/page/pondr

REMOVE Invoice Extractor

/page/invoice-extractor

REMOVE Building a Writing Assistant (Lazywriter) with Streamlit

/page/lazywriter

REMOVE Introduction

Welcome to the first module on Natural Language Processing (NLP) and Large Language Models!

REMOVE Introduction

REMOVE Introduction

REMOVE Semantic Search Using the Embed Endpoint

Intro to the Cohere Endpoints: Classify, Embed, Search. From https://cohere.com/blog/hello-world-p2/

REMOVE Semantic Search Using Embeddings

Intro to the Cohere Endpoints: Classify, Embed, Search. From https://cohere.com/blog/hello-world-p2/

Structure of the Course (WITH DEPLOYMENT ADDED)

Backup Structure

REMOVE Introduction

REMOVE The Embed Endpoint (COPY)

Intro to the Cohere Endpoints: Classify, Embed, Search. From https://cohere.com/blog/hello-world-p2/

[ALT] The Generate Endpoint

In this chapter, you'll learn how to use the Cohere Generate endpoint, and use it to generate responses to different prompts.

REMOVE Topic Modeler

From: /page/topic-modeling

Model Cards

Status Page

Model Limitations

This document discusses factors that may impact the performance of language models, including language limitations, socio-economic biases, historical data constraints, ungrounded outputs, and biases that reflect existing societal stereotypes.

Multi-Message Conversations

This document explains how to interact with the Chat API to have multi-message conversations using the chat_history parameter or a user-defined conversation_id.

Old Tutorials

Content Moderation

This document introduces the Classify endpoint for text classification tasks, provides examples of harmful content typologies, and offers a quick walkthrough on using the Cohere API for content moderation. It also includes code snippets for accessing the Classify endpoint and suggests custom training for better classification performance.

Entity Extraction

This document provides an overview of using generative language models to extract entities, specifically movie names, from text. It includes examples, prompts, data extraction results, and a summary of the process.

Customer Support

Intent Recognition

Quickstart Tutorials

Cohere's API helps build natural language understanding and generation with just a few lines of code. These tutorials walk you through implementing text classification, intent recognition, sentiment analysis, text summarization, and toxicity detection in under 5 minutes.

Semantic Search

This document provides a guide on building a simple semantic search engine using language models to search by meaning. It includes steps to embed text, build an index, conduct nearest neighbor search, and visualize the results.

Sentiment Analysis

Text Classification

Text Classification (Classify)

This document explains how to use the Classify endpoint to classify text based on sentiment, with examples and code snippets provided. It also discusses training custom classification models for better performance.

Text Classification (Embed)

This document provides a guide on building classifiers using Cohere's embeddings for sentiment analysis of film reviews. It includes steps to install Cohere, get the dataset, embed the reviews, train a classifier, and evaluate its performance.

Toxicity Detection

Prompt Engineering

Use the API to generate completions, distill text into semantically meaningful vectors, and more. Get state-of-the-art natural language processing without the need for expensive supercomputing infrastructure.

Prompting Command-R (COPY)

[Quickstart] Customer Support

RAG-Powered E-Commerce Chatbot

Representation Benchmarks

This page describes benchmarks associated with Cohere's representation models.

Rerank API

This document is a guide on how to use the Rerank endpoint to rank articles based on a query using the Cohere API. It provides instructions on setting up the SDK, adding a query and documents, and printing the results.

(OLD) Retrieval Augmented Generation (RAG)

Sandbox

This will be deleted

Sentiment Analysis

/classify

Sentiment Analysis

Learn how to perform sentiment analysis and classify text sentiments using the Cohere SDK.

Summarize API

This document provides information on how to use the Cohere API's Summarize endpoint to generate concise summaries of text, with options to control output length and format. It also includes experimental features for formatting, handling long documents, and providing additional instructions for focusing the summary.

Supported Languages (Language Detection)

Languages co.detect_lang can detect.

Temperature

The document explains how temperature affects randomness in generation models when sampling, with lower temperatures leading to less randomness and higher temperatures leading to more randomness. A temperature of 1 is generally a good starting point for most tasks.

[ARCHIVE] Key Concepts for Generating Text

Likelihood

This document explains how a language model learns to predict the next token in a sentence by analyzing the likelihood of different tokens based on the context of the sentence. The model's mean log likelihood quantifies its level of surprise at the use of a particular token in a sentence.

Archive test number of generations

Text Classification Guide

Command

Tokens

This document explains that language models use tokens to represent words, with common words having unique tokens and longer, less frequent words being encoded into multiple tokens. The number of tokens in a text can vary based on complexity, with simple text having about 1 token per word on average.

Toxicity Detection

Build a Text Classification Engine with /v1/classify

This page describes how to build a text classification engine with Cohere's LLM platform.

Toxicity Detection with Cohere

Learn how to classify user comments for toxicity using Cohere's SDK with this interactive tutorial.

/v1/classify

Customer Support Classification with Cohere

Get started with a text classification system to augment customer support by automatically routing tickets.

Larger Cohere Representation Models

New Representation Model sizes and an increased token limit offer improved performance and flexibility.

Extremely Large (Beta) Release

Take your NLP tasks further with our new top-tier model, Extremely Large (Beta), now available.

Introducing Classification Endpoint

Classify text with Cohere's new classification endpoint, powered by generation models, offering few-shot learning.

Finetuning Available + Policy Updates

Fine-tune models with your own data and leverage updated policies for powerful NLP solutions.

New & Improved Generation Models

Try our new small, medium, and large generation models with improved performance from our high-quality dataset.

New and Improved Extremely Large Model!

We're thrilled to introduce our enhanced xlarge model, now with superior generation quality and speed.

Updated Small, Medium, and Large Generation Models

The latest updates improve model stability and fix a bug for more effective generation presence and frequency penalties.

New & Improved Generation and Representation Models

Enhance your text generation and representation with improved models, now offering better context support and optimal performance.

The `model` Parameter Becomes Optional.

Our APIs are now model-agnostic with default endpoint settings, offering greater flexibility and control for users.

Introducing Moderate Tool (Beta)!

Access cutting-edge natural language processing tools without the need for costly supercomputing power.

Pricing Update and New Dashboard UI

Unlock new features, including production keys, flat-rate pricing, improved UI, and enhanced team collaboration and model insights.

Co.classify uses Representational model embeddings

Improve few-shot classification with Co.classify and embeddings from our Representational model.

New Logit Bias experimental parameter

Take control of your generative models with the new logit_bias parameter to guide token generation.

New Look For Cohere Documentation!

Explore our updated docs with interactive tutorials, improved info architecture, and a UI refresh for a streamlined experience.

Current Model Upgrades + New Command Beta Model

Introducing new and improved Medium and XLarge models, plus a Command model for precise responses to commands.

Model Sizing Update + Improvements

We're updating our generative AI models to offer improved Medium and X-Large options.

Multilingual Text Model + Language Detection

Cohere's multilingual model now supports semantic search across 100 languages with a single index.

Command Model Nightly Available!

Get improved performance with our new nightly versions of Command models, now available in medium and x-large sizes.

Command R+ is a scalable LLM for business

Explore Command R+, Cohere's powerful language model, excelling in multi-step tool use and complex conversational AI tasks.

Multilingual Support for Co.classify

The co.classify endpoint now supports multilingual capabilities with the new multilingual-22-12 model.

Cohere Model Names Are Changing!

We've updated our model names for simplicity and consistency, and old names will work for now.

New Maximum Number of Input Documents for Rerank

Stay up to date with our latest changes to co.rerank, now with an improved maximum document limit.

Release Notes June 28th 2023 (Changelog)

The latest Command model update brings enhanced code, conversation, and reasoning, along with new API features and usage/billing improvements.

Release Notes August 8th 2023 (Changelog)

Unlock improved reasoning and conversation with Command R+, now featuring Okta OIDC support and an enhanced finetuning SDK.

Release Notes September 29th 2023

Experience the future of generative AI with co.chat() and explore the power of retrieval-augmented generation for grounded and timely outputs.

Release Notes January 22, 2024

Discover new AI capabilities with Cohere's latest features, including improved fine-tuning, Embed Jobs API, and multi-language SDK support.

Cohere Python SDK v5.0.0 release

Stay up-to-date with our latest Python SDK release and learn about deprecated functions and migration instructions.

Fine-tuning has been added to the Python SDK

Stay up-to-date with Cohere's Python SDK by checking out the new fine_tuning feature and its functions.

Command R: Retrieval-Augmented Generation at Scale

Command R: Retrieval Augmented Generation at scale.

Cohere Python SDK v5.2.0 release

Stay up to date with our Python SDK update, including local tokenizer defaults and new required fields.

Advanced Retrieval Launch release

Rerank 3 offers improved performance and inference speed for long and short documents with a context length of 4096.

Release Notes for June 10th 2024

Get started with multi-step tool use, explore new docs, and learn about billing changes in Cohere's Chat API.

Force JSON object response format

Generate outputs in JSON objects with the new 'response_format' parameter, now available with the 'command-nightly' model.

Command models get an August refresh

We're excited to announce updates to our Command R and R+ models, offering improved performance, new features, and more.

New Embed, Rerank, Chat, and Classify APIs

Introducing improvements to our Chat, Classify, Embed, and Rerank APIs in a major version upgrade, making it easier and faster to build with Cohere.

Refreshed Command R and R+ models now on Azure

Introducing our improved Command models are available on the Azure cloud computing platform.

Fine-Tuning Now Available for Command R 08-2024

Launch of fine-tuning for Command R 08-2024 and other new fine-tuning features.

Embed v3.0 Models are now Multimodal

Launch of multimodal embeddings for our Embed models, plus some code to help get started.

Structured Outputs support for tool use

Structured Outputs now supports both JSON and tool use scenarios.

Announcing Rerank-v3.5

Release announcment for Rerank 3.5 - our new state of the art model for ranking.

Announcing Command R7b

Release announcment for Command R 7B - our fastest, lightest, and last Command R model.

Aya Expanse is Available on WhatsApp!

Release announcement for the ability to chat with Aya Expanse on WhatsApp

Cohere's Multimodal Embedding Models are on Bedrock!

Release announcement for the ability to work with multimodal image models on the Amazon Bedrock platform.

Deprecation of Classify via default Embed Models

Usage of Classify endpoint via the default Embed models is now deprecated. Usage of Classify endpoint via a fine-tuned Embed model is not affected.

Cohere's Rerank v3.5 Model is on Azure AI Foundry!

Release announcement for the ability to work with Cohere Rerank v3.5 models in the Azure's AI Foundry.

Cohere's Rerank v3.5 Model is on Azure AI Foundry!

Release announcement for the ability to work with Cohere Rerank v3.5 models in the Azure's AI Foundry.

Cohere via OpenAI SDK Using Compatibility API

With the Compatibility API, you can use Cohere models via the OpenAI SDK without major refactoring.

Cohere Releases Arabic-Optimized Command Model!

Release announcement for the Command R7B Arabic model

Our Groundbreaking Multimodal Model, Aya Vision, is Here!

Release announcement for the new multimodal Aya Vision model

Announcing Command A

Release of Command A, a performant model suited for tool use, RAG, agents, and multilingual uses, with 111 billion parameters and a 256k context length.

Announcing Embed Multimodal v4

Release of Embed Multimodal v4, a performant search model, with Matryoshka embeddings and a 128k context length.

Announcing Cutting-Edge Cohere Models on OCI

This announcement covers the release of Command A, Rerank v3.5, and Embed v3.0 multimodal on Oracle Cloud Infrastructure's platform.

Announcing Cohere's Command A Vision Model

This announcement covers the release of Command A Vision, Cohere's first model able to understand and interpret image inputs.

Announcing Cohere's Command A Reasoning Model

This announcement covers the release of Command A Reasoning, Cohere's first model able to engage in thinking and reasoning.

Announcing Cohere's Command A Translate Model

This announcement covers the release of Command A Translate, Cohere's most powerful translation model.

Announcing Major Command Deprecations

This announcement covers a series of major deprecations, including of classic Command models, several parameters, and entire endpoints.

Cohere's Rerank v4.0 Model is Here!

Release announcment for Rerank 4.0 - our new state of the art model for ranking.

Announcing the Cohere Transcribe model

This announcement covers the release of Cohere Transcribe, Cohere's first transcription model.

Retirement of Embed v2.0 and Aya Expanse / Vision 8B

Effective April 4, 2026, five models are no longer available on the Cohere API. Migrate to Embed v3/v4 and Command or Aya 32B alternatives.

Announcing Cohere's Command A+

This announcement covers the release of Command A+, Cohere's last model in the Command A family.

Announcing Cohere's North Mini Code

This announcement covers the release of North Mini Code, Cohere's first open-source agentic coding model.

Meet Cohere Transcribe Arabic

This announcement covers the release of Cohere Transcribe Arabic, Cohere's specialist speech recognition model for transcribing Arabic audio.

Meet Cohere Parse

This announcement covers the release of Cohere Parse, Cohere's document parsing model for visual understanding and document intelligence workflows.

Announcing Cohere's North Small Translate

This announcement covers the release of North Small Translate, Cohere's open-weights machine translation model.

Announcing Cohere's Embed 5 Models

Release announcement for Embed 5 Pro and Embed 5 Fast, Cohere's most powerful family of embeddings models for enterprise search and retrieval.

Changelog overview

Release Notes (Archive)

Model Commands

Finetune

Generate Docs

Model

Admin Commands

Admin

Auth

Config

Key

Ping

Usage

User

Installation

Introduction to Fine-Tuning with Cohere Models

Fine-tune Cohere's large language models for specific tasks, styles, and formats with custom data.

Cohere SDKs

Document Parsing - best practices

Best practices for image format, resolution, and throughput when using the Cohere Parse API.

Document Parsing

A quickstart guide for parsing documents with Cohere's Parse model.

Retrieval Augmented Generation (RAG)

A quickstart guide for performing retrieval augmented generation (RAG) with Cohere's Command models (v1 API).

Reranking

A quickstart guide for performing reranking with Cohere's Reranking models (v1 API).

Semantic Search

A quickstart guide for performing text semantic search with Cohere's Embed models (v1 API).

Text Generation

A quickstart guide for performing text generation with Cohere's Command models (v1 API).

Tool Use & Agents

A quickstart guide for using tool use and building agents with Cohere's Command models (v1 API).

Overview

Cohere's API documentation helps developers easily integrate natural language processing and generation into their products.

Customer Support

Intent Recognition

Sentiment Analysis

Toxicity Detection

Build an Onboarding Assistant with Cohere!

This page describes how to build an onboarding assistant with Cohere's large language models.

Building a Chatbot with Cohere

This page describes building a generative-AI powered chatbot with Cohere.

Building a Generative AI Agent with Cohere

This page describes building a generative-AI powered agent with Cohere.

Building RAG models with Cohere

This page walks through building a retrieval-augmented generation model with Cohere.

Master Reranking with Cohere Models

This page contains a tutorial on using Cohere's ReRank models.

Semantic Search with Cohere Models

This is a tutorial describing how to leverage Cohere's models for semantic search.

Cohere Text Generation Tutorial

This page walks through how Cohere's generation models work and how to use them.

Introduction to Cohere on Azure AI Foundry

An introduction to Cohere on Azure AI Foundry, a fully managed service by Azure.

Retrieval Augmented Generation (RAG) on Azure

A guide for performing retrieval augmented generation (RAG) with Cohere's Command models on Azure AI Foundry (API v1).

Reranking

A guide for performing reranking with Cohere's Reranking models on Azure AI Foundry (API v1).

Semantic Search

A guide for performing text semantic search with Cohere's Embed models on Azure AI Foundry (API v1).

Text Generation

A guide for performing text generation with Cohere's Command models on Azure AI Foundry (API v1).

Tool Use & Agents

A guide for using tool use and building agents with Cohere's Command models on Azure AI Foundry (API v1).

Cohere Cookbooks: AI Agents, RAG, Search, and More

Get started with Cohere's cookbooks to build agents, QA bots, perform searches, and more, all organized by category.

Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu