Cohere integration

AI: chat (Command), embeddings, rerank, classify, summarize, tokenize, detokenize, datasets

Help Centre › Connectors

Overview

Cohere builds enterprise LLMs focused on retrieval and reranking. The Automize connector covers Chat, Embed, Rerank, Classify, Tokenize, Detokenize, and Model metadata via the Cohere REST API.

  • Regions: Single global API at api.cohere.com. EU residency available on Enterprise plans via a separate api.cohere-eu.com host – set the connector's base URL if you've been provisioned onto it.
  • Plans: Trial keys throttle to 5 requests/minute on Chat and 100/minute on Embed – fine for prototyping, will rate-limit fast in any production flow. Production keys remove the per-minute caps and unlock command-r-plus and embed-english-v3.0.

Setting up the connection

Auth type: Bearer Token.

  1. In the Cohere dashboard, open API Keys and create a Production key. Trial keys exist for quickstart use but rate-limit aggressively.
  2. Copy the key (it's shown once) and paste it as the API token in Automize.
  3. The connector sends Authorization: Bearer <key> and X-Client-Name: Automize so requests show up correctly in Cohere's usage dashboard.

Find your credentials at https://dashboard.cohere.com/api-keys.


Rate limits

Production: 10,000 chat req/min, 2,000 embed req/min (96 texts/request), 1,000 rerank req/min. Trial: 5 chat / 100 embed. Hard cap on output tokens per Chat call (~4k) regardless of plan. Connector retries on 429 with exponential backoff.


Data model

Cohere's model family + endpoints:

    Chat            command-r, command-r-plus, command (legacy)
    Embed           embed-english-v3.0, embed-multilingual-v3.0,
                    embed-english-light-v3.0 (lower-dim, cheaper)
    Rerank          rerank-english-v3.0, rerank-multilingual-v3.0
    Classify        classify (few-shot, no fine-tune step)
    Tokenize        deterministic – same tokens across calls

Embed input_type taxonomy (REQUIRED on v3 embed models):

    search_document   docs you're indexing for retrieval
    search_query      queries you're matching against the index
    classification    inputs you'll feed to Classify
    clustering        inputs you'll cluster

Using the wrong input_type silently degrades retrieval quality –
v3 embeddings train asymmetric encoders. document/query vectors
live in compatible subspaces; cross-classifying produces garbage.

Chat connectors (RAG/grounding):

    web-search        Cohere's hosted web search
    retrieval         your own RAG via documents: [{title, snippet}]
    tool-use          function calling via tools: [{name, schema}]

Citations always come back in chat.citations[] when connectors fire.

Available operations

8 operations available. Click any row to jump to its detail.

OperationCategoryWhat it does
ChatGeneralGenerate a chat completion (Command R/R+)
ClassifyGeneralClassify inputs into provided categories
DetokenizeGeneralConvert token ids back to text
EmbedGeneralGenerate embeddings for text or images
Get ModelGeneralGet model details
List ModelsGeneralList available models
RerankGeneralRerank documents against a query (great for retrieval-comparator pipelines)
TokenizeGeneralTokenize a piece of text

Operations

Chat

Generate a chat completion (Command R/R+)

ParameterRequiredTypeDescription
Model modelNotext
Messages messagesNotext
Temperature temperatureNotext
Max Tokens max_tokensNotext
P pNotext
K kNotext
Tools toolsNotext
Documents documentsNotext
Citation Options citation_optionsNotext

Tips

  • Pass message for single-turn or chat_history + message for multi-turn. Use connectors=[{'id':'web-search'}] for grounded answers with citations.
  • model defaults to command-r – use command-r-plus for higher quality at ~3x cost.
  • stream=true is supported by the API but the connector resolves the full response (use SSE-aware actions elsewhere if you need token-level streaming).

Classify

Classify inputs into provided categories

ParameterRequiredTypeDescription
Model modelNotext
Inputs inputsNotext
Examples examplesNotext
Preset presetNotext

Tips

  • Few-shot classification – pass examples (text + label pairs, 2+ per label, 5+ total). No fine-tuning step needed.
  • Best for short text (<512 tokens). Long documents – embed + cluster instead.

Detokenize

Convert token ids back to text

ParameterRequiredTypeDescription
Model modelNotext
Tokens tokensNotext

Tips

  • Inverse of Tokenize – token IDs back to text. Useful for debugging tokenisation edge cases (special characters, emoji, non-Latin scripts).

Embed

Generate embeddings for text or images

ParameterRequiredTypeDescription
Model modelNotext
Texts textsNotext
Images imagesNotext
Input Type input_typeNotext
Embedding Types embedding_typesNotext
Truncate truncateNotext

Tips

  • input_type is REQUIRED (search_document, search_query, classification, clustering). Mismatched input_type silently degrades retrieval quality.
  • Up to 96 texts per call, 512 tokens each. Use embed-english-v3.0 for production retrieval; embed-multilingual-v3.0 covers 100+ languages.

Get Model

Get model details

ParameterRequiredTypeDescription
Model Id model_idYestext

Tips

  • GET /v1/models/{model_name} – capabilities, context_length, max_output_tokens, finetuned (bool), tokenizer.
  • Pin the exact model name in production; -latest aliases drift when Cohere ships new versions.

List Models

List available models

No input parameters.

Tips

  • Returns every model + endpoint pairing accessible to the workspace. endpoint field distinguishes chat/embed/rerank/classify variants.
  • tokenizer_url field lets you download the BPE table for offline tokenisation – handy for client-side token counting.

Rerank

Rerank documents against a query (great for retrieval-comparator pipelines)

ParameterRequiredTypeDescription
Model modelNotext
Query queryNotext
Documents documentsNotext
Top N top_nNotext
Rank Fields rank_fieldsNotext
Return Documents return_documentsNotext

Tips

  • Pass a query + documents[] (up to 1000) and get back relevance-sorted indexes. This is the cheapest way to lift retrieval quality on top of any vector DB.
  • top_n limits returned results; total documents scanned is unchanged. Returns relevance_score in [0, 1].

Tokenize

Tokenize a piece of text

ParameterRequiredTypeDescription
Model modelNotext
Text textNotext

Tips

  • Returns the token IDs + the string fragment per token for any input text. Deterministic per model – same input always gives same tokens.
  • Use for prompt budgeting: count tokens before sending Chat to predict cost + stay under context-length caps.

FAQ

Trial key vs Production key – what's actually different?
Trial keys are free, throttle at 5 chat/min, and bar commercial use per Cohere's TOS. Production keys are billed per token, no rate cap (other than the per-minute production limits), and clear for production traffic. Use trial for prototyping only.
Why are my embeddings worse than I expected?
Check input_type. Embedding a query with input_type=search_document (instead of search_query) produces vectors in the wrong subspace – they look fine but rank terribly. The v3 models train asymmetric document/query encoders.
Rerank pricing vs running a bigger retrieval?
Rerank is per-document, per-query. For top-K=10 over 100 candidates, you're charged for 100 documents. Cheaper than running a 7B reranker yourself in almost every case; more expensive than the embed search step before it.
Do I get token usage back?
Yes – the chat response includes a meta.tokens block with input_tokens, output_tokens, and prompt_tokens. Log these against your Automize run for cost attribution.

Related connectors

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.