The Cohere platform builds natural language processing and generation into your product with a few lines of code. Our large language models can solve a broad spectrum of natural language use cases, including classification, semantic search, paraphrasing, summarization, and content generation.

By training a custom model, users can customize large language models to their use case and trained on their data.

The models can be accessed through the playground, SDK, and the CLI tool.


First, let's install the SDK (the examples below are in Python, Typescript, and Go):

pip install cohere
npm i -s cohere-ai
go get

Import dependencies and set up the Cohere client.

import cohere
co = cohere.Client('Your API key')
import { CohereClient } from "cohere-ai";

const cohere = new CohereClient({
    token: "YOUR_API_KEY",

(async () => {
    const prediction = await cohere.generate({
        prompt: "hello",
        maxTokens: 10,
    console.log("Received prediction", prediction);
import cohereclient ""

client := cohereclient.NewClient(cohereclient.WithToken("<YOUR_AUTH_TOKEN>"))

(You can find more detailed instructions for getting set up by checking out the Github repositories for Python, Typescript, and Go.)

Request Specification

To make a request to any model, you must pass in the Authorization Header and the request must be made through a POST request.

The content of Authorization should be in the shape of BEARER [API_KEY]. All request bodies are sent through JSON.

Model names are found within the dashboard, and details about endpoints are available within the documentation.

Detailed model information can be found in the Model Cards.