# Cohere

> Use Cohere's Command, Embed, Rerank, Parse and Transcribe models in your workflows. Generate text, answer questions from your documents with citations, extract data, classify and translate text, and read images; create embeddings and rank documents for semantic search; and turn recordings and PDFs into text.

App · AI Models · 13 actions. Web page: https://docs.lodol.com/docs/integrations/cohere

## Actions

### Answer from documents

Answer a question using only the documents you give it, such as help-center articles or search results, with citations saying which document backs up each part of the answer.

**Inputs**

- Question (`question`, text, required): What to answer, such as 'How long do refunds take?'
- Documents (`documents`, list, required): The texts to answer from, one per entry: articles, policy sections, search results, or rows from an earlier step. Citations name them by position, counting from 1.
- Instructions (`instructions`, text): How to answer, such as 'Reply in two sentences' or 'Say you do not know when the documents do not cover it'.
- Model (`model`, text): Which Cohere model does the work. Command A+ suits most jobs. One of: `command-a-plus-05-2026` (Command A+ (most capable, recommended)), `command-a-reasoning-08-2025` (Command A Reasoning (thinks before it answers)), `command-a-03-2025` (Command A), `command-r-plus-08-2024` (Command R+), `command-r-08-2024` (Command R), `command-r7b-12-2024` (Command R7B (fastest, lowest cost)). Default: `command-a-plus-05-2026`.
- Maximum response length (`max_tokens`, number): The most tokens the response may use; a token is about three-quarters of a word. Leave blank to use the model's own maximum output length. At least 1.
- Thinking (`thinking`, text): Whether a reasoning model (Command A+ or Command A Reasoning) thinks before it answers. Thinking is slower, and it counts against the maximum response length. Other models never think. Off works as expected on Command A Reasoning; Command A+ then reasons inside its answer instead. One of: `default` (Model's default), `on`, `off`. Default: `default`.

**Outputs**

- `answer` (text): The answer.
- `citations` (list): Each passage of the answer the documents back up.
- `cited_positions` (list): The positions of the documents cited, from 1.
- `finish_reason` (text): COMPLETE when it finished, MAX_TOKENS when it was cut off, STOP_SEQUENCE when it stopped at a stop word.
- `input_tokens` (number): Tokens read, as billed.
- `is_grounded` (true/false): Whether any document backs up the answer.
- `model` (text): The model that answered.
- `output_tokens` (number): Tokens written, as billed.
- `sources` (list): The documents cited, in the order given.
- `was_cut_off` (true/false): Whether it hit the maximum response length.

**Example output**

```json
{
  "answer": "Refunds are issued within 5 business days.",
  "citations": [
    {
      "document_positions": [
        2
      ],
      "text": "within 5 business days"
    }
  ],
  "cited_positions": [
    2
  ],
  "finish_reason": "COMPLETE",
  "input_tokens": 120,
  "is_grounded": true,
  "model": "command-a-plus-05-2026",
  "output_tokens": 12,
  "sources": [
    {
      "citation_count": 1,
      "document": "Refunds are issued within 5 business days of approval.",
      "position": 2
    }
  ],
  "was_cut_off": false
}
```

### Ask about an image

Ask a Cohere vision model a question about one or more pictures: describe a photo, read a chart or a table, or answer a question about a scanned document.

**Inputs**

- Images (`images`, list, required): The pictures to look at: upload them, pick files from an earlier step, or paste public web addresses. PNG, JPEG, WebP or GIF (other formats are converted), up to 20.
- Question (`question`, text): What to ask about the pictures. Leave blank for a detailed description.
- Model (`model`, text): Which Cohere model looks at the pictures. Command A Vision answers at once; Command A+ thinks first, which can take a while. One of: `command-a-vision-07-2025` (Command A Vision (answers at once, recommended)), `command-a-plus-05-2026` (Command A+ (thinks first; most capable)), `c4ai-aya-vision-32b` (Aya Vision 32B (23 languages)). Default: `command-a-vision-07-2025`.
- Detail (`detail`, text): How closely to look. High reads small print but uses more tokens; Low is faster and cheaper. One of: `auto` (Automatic), `low` (Low (faster, fewer tokens)), `high` (High (reads small print)). Default: `auto`.
- Maximum response length (`max_tokens`, number): The most tokens the response may use; a token is about three-quarters of a word. Leave blank to use the model's own maximum output length. At least 1.
- Thinking (`thinking`, text): Whether a reasoning model (Command A+ or Command A Reasoning) thinks before it answers. Thinking is slower, and it counts against the maximum response length. Other models never think. Off works as expected on Command A Reasoning; Command A+ then reasons inside its answer instead. One of: `default` (Model's default), `on`, `off`. Default: `default`.

**Outputs**

- `answer` (text): The model's answer.
- `finish_reason` (text): COMPLETE when it finished, MAX_TOKENS when it was cut off, STOP_SEQUENCE when it stopped at a stop word.
- `image_count` (number): How many pictures it looked at.
- `input_tokens` (number): Tokens read, as billed.
- `model` (text): The model that answered.
- `output_tokens` (number): Tokens written, as billed.
- `was_cut_off` (true/false): Whether it hit the maximum response length.

**Example output**

```json
{
  "answer": "A monarch butterfly resting on a pink flower.",
  "finish_reason": "COMPLETE",
  "image_count": 1,
  "input_tokens": 790,
  "model": "command-a-vision-07-2025",
  "output_tokens": 12,
  "was_cut_off": false
}
```

### Classify text

Have a Command model pick the one category that fits a piece of text, such as routing a support email, and say why. The answer is always exactly one of the categories you list.

**Inputs**

- Text (`text`, text, required): The text to classify, such as an email, a review or a support ticket.
- Categories (`categories`, list, required): The categories to choose from, one per entry. The step always returns exactly one of them, spelled as you wrote it.
- How to decide (`instructions`, text): Rules for borderline cases, such as 'Anything that mentions money back is a Refund request'.
- Model (`model`, text): Which Cohere model decides. Command A+ suits most jobs. One of: `command-a-plus-05-2026` (Command A+ (most capable, recommended)), `command-a-03-2025` (Command A), `command-r-plus-08-2024` (Command R+), `command-r-08-2024` (Command R). Default: `command-a-plus-05-2026`.

**Outputs**

- `categories` (list): The categories it chose from.
- `category` (text): The category chosen.
- `input_tokens` (number): Tokens read, as billed.
- `model` (text): The model that chose.
- `output_tokens` (number): Tokens written, as billed.
- `reason` (text): Why, in one sentence.

**Example output**

```json
{
  "categories": [
    "Refund request",
    "Bug report",
    "Sales question"
  ],
  "category": "Refund request",
  "input_tokens": 96,
  "model": "command-a-plus-05-2026",
  "output_tokens": 21,
  "reason": "The customer asks for their money back."
}
```

### Count tokens

Count how many tokens a text is for a Cohere model, to check a prompt fits before sending it or to estimate what it will cost.

**Inputs**

- Text (`text`, text, required): The text to count, up to 65,536 characters.
- Model (`model`, text): The model whose tokens to count: each family splits text its own way. Defaults to command-a-plus-05-2026. Default: `command-a-plus-05-2026`.

**Outputs**

- `character_count` (number): How many characters the text is.
- `model` (text): The model whose tokens were counted.
- `token_count` (number): How many tokens the text is.
- `token_strings` (list): Each token's text, in order.
- `tokens` (list): The tokens, as the numbers the model reads.

**Example output**

```json
{
  "character_count": 12,
  "model": "command-a-plus-05-2026",
  "token_count": 3,
  "token_strings": [
    "Hello",
    " world",
    "!"
  ],
  "tokens": [
    28339,
    2286,
    38
  ]
}
```

### Create embeddings

Turn texts into vectors with Cohere Embed for semantic search, deduplication, clustering or classification, ready to store in a vector database such as Pinecone or Qdrant.

**Inputs**

- Texts (`texts`, list, required): The texts to turn into vectors, one per entry. Each gives one vector, in the same order; up to 1,000.
- What the texts are (`input_type`, text): Embed what you store as 'Documents to search' and what you look things up with as 'Search queries': Cohere makes the two kinds to match each other. One of: `search_document` (Documents to search (to store)), `search_query` (Search queries (to look up with)), `classification` (Texts to classify), `clustering` (Texts to group). Default: `search_document`.
- Model (`model`, text): Which Embed model to use. Match the model already used for any vectors you will compare these with. One of: `embed-v5.0-pro` (Embed 5 Pro (most capable, recommended)), `embed-v5.0-fast` (Embed 5 Fast), `embed-v4.0` (Embed 4), `embed-multilingual-v3.0` (Embed Multilingual 3 (1,024 numbers)), `embed-english-v3.0` (Embed English 3 (1,024 numbers)), `embed-multilingual-light-v3.0` (Embed Multilingual Light 3 (384 numbers)), `embed-english-light-v3.0` (Embed English Light 3 (384 numbers)). Default: `embed-v5.0-pro`.
- Vector length (`dimensions`, text): Shorter vectors take less storage. Embed 5 and Embed 4 can be shortened; the older models always give their own length. One of: `full` (Full length (the model's default)), `256` (256 numbers), `512` (512 numbers), `768` (768 numbers (Embed 5 only)), `1024` (1,024 numbers), `1536` (1,536 numbers), `2048` (2,048 numbers (Embed 5 only)). Default: `full`.

**Outputs**

- `count` (number): How many vectors.
- `dimensions` (number): How many numbers each vector has.
- `embedding` (list): The first text's vector.
- `embeddings` (list): One vector per text, in the same order.
- `input_tokens` (number): Tokens billed.
- `input_type` (text): What the texts were embedded as.
- `model` (text): The model used.

**Example output**

```json
{
  "count": 2,
  "dimensions": 3,
  "embedding": [
    0.012,
    -0.043,
    0.031
  ],
  "embeddings": [
    [
      0.012,
      -0.043,
      0.031
    ],
    [
      0.018,
      -0.039,
      0.027
    ]
  ],
  "input_tokens": 14,
  "input_type": "search_document",
  "model": "embed-v5.0-pro"
}
```

### Extract data

Pull the fields you name out of text or pictures, such as the total on a photographed receipt or the sender's company in an email, ready for a spreadsheet row or a CRM record. A field the material does not mention comes back empty, never guessed.

**Inputs**

- Text (`text`, text): The text to pull the fields out of, such as an email or an invoice. Leave blank when the images hold everything.
- Images (`images`, list): Pictures to read: upload them, pick files from an earlier step, or paste public web addresses. PNG, JPEG, WebP or GIF (other formats are converted), up to 20.
- Fields (`fields`, list): The pieces of information you want, one per entry. Add what each means after a colon to steer it: 'total: the amount due in dollars'.
- Instructions (`instructions`, text): Extra rules, such as 'Write dates as YYYY-MM-DD'.
- Model (`model`, text): Which Cohere model reads the material. Pictures need Command A+ or Command A Vision. One of: `command-a-plus-05-2026` (Command A+ (reads images, recommended)), `command-a-vision-07-2025` (Command A Vision (reads images)), `command-a-03-2025` (Command A), `command-r-plus-08-2024` (Command R+), `command-r-08-2024` (Command R). Default: `command-a-plus-05-2026`.
- JSON Schema (advanced) (`json_schema`, text): Instead of 'Fields', paste a JSON Schema whose root is an object, for numbers, lists or nested fields. Every object in it must list its required fields. When set, 'Fields' is ignored.

**Outputs**

- `data` (object): The fields, by the names asked for.
- `found_fields` (list): The fields that were filled.
- `input_tokens` (number): Tokens read, as billed.
- `missing_fields` (list): The fields the material did not mention.
- `model` (text): The model that read it.
- `output_tokens` (number): Tokens written, as billed.

**Example output**

```json
{
  "data": {
    "invoice number": "INV-1042",
    "total": "$1,250.00",
    "vendor": "Acme Ltd"
  },
  "found_fields": [
    "invoice number",
    "vendor",
    "total"
  ],
  "input_tokens": 212,
  "missing_fields": [],
  "model": "command-a-plus-05-2026",
  "output_tokens": 31
}
```

### Generate a Cohere response

Send a prompt to a Cohere Command model and get back its written response, as text or as a JSON object a later step can read field by field.

**Inputs**

- Prompt (`prompt`, text, required): The message or question to send to Cohere.
- Model (`model`, text): Which Cohere model writes the response. Command A+ suits most jobs; Command A Reasoning thinks first, for harder problems; Command R7B is the fastest. Defaults to command-a-plus-05-2026. One of: `command-a-plus-05-2026` (Command A+ (most capable, recommended)), `command-a-reasoning-08-2025` (Command A Reasoning (thinks before it answers)), `command-a-03-2025` (Command A), `command-r-plus-08-2024` (Command R+), `command-r-08-2024` (Command R), `command-r7b-12-2024` (Command R7B (fastest, lowest cost)). Default: `command-a-plus-05-2026`.
- Maximum response length (`max_tokens`, number): The most tokens the response may use; a token is about three-quarters of a word. Leave blank to use the model's own maximum output length. At least 1.
- Instructions (`instructions`, text): How the model should behave, such as 'Answer in one short paragraph' or 'You are a friendly support agent for Acme'.
- Creativity (temperature) (`temperature`, number): From 0 (focused and repeatable) to 1 (most varied). Leave blank for Cohere's default of 0.3. From 0 to 1.0.
- Thinking (`thinking`, text): Whether a reasoning model (Command A+ or Command A Reasoning) thinks before it answers. Thinking is slower and uses more tokens, and comes back separately from the response. Other models never think. Off works as expected on Command A Reasoning; Command A+ then reasons inside its answer instead. One of: `default` (Model's default), `on`, `off`. Default: `default`.
- Response format (`reply_format`, text): Choose 'A JSON object' to get the response as data, in 'data'. Say in the prompt which fields the object should have. One of: `text`, `json` (A JSON object). Default: `text`.

**Outputs**

- `data` (object): The response as a JSON object, when the response format is A JSON object.
- `finish_reason` (text): COMPLETE when it finished, MAX_TOKENS when it was cut off, STOP_SEQUENCE when it stopped at a stop word.
- `input_tokens` (number): Tokens read, as billed.
- `model` (text): The model that answered.
- `output_tokens` (number): Tokens written, as billed.
- `response_text` (text): The text that Cohere generated for your prompt.
- `status` (text): Action execution status.
- `thinking` (text): The model's reasoning, when it thought first.
- `was_cut_off` (true/false): Whether it hit the maximum response length.

**Example output**

```json
{
  "data": null,
  "finish_reason": "COMPLETE",
  "input_tokens": 18,
  "model": "command-a-plus-05-2026",
  "output_tokens": 24,
  "response_text": "Here is a thoughtful response to your question about artificial intelligence and its applications in modern software development.",
  "status": "success",
  "thinking": null,
  "was_cut_off": false
}
```

### Get a model

Look up one Cohere model: what it is for, how much text it takes in, the abilities it has and whether it is deprecated.

**Inputs**

- Model (`model`, text, required): The model to look up. Pick one, or type its name, such as command-a-plus-05-2026.

**Outputs**

- `context_length` (number): The most tokens it can take in at once.
- `default_for` (list): The endpoints it is Cohere's default model for.
- `endpoints` (list): What it can be used for: chat, embed, rerank and so on.
- `features` (list): Extra abilities, such as tool use, vision or JSON output.
- `is_deprecated` (true/false): Whether Cohere has deprecated it.
- `is_fine_tuned` (true/false): Whether it is a fine-tuned model.
- `name` (text): The model's name, to use in any Cohere step.
- `sampling_defaults` (object): The settings it uses when a request leaves them out, such as temperature.
- `tokenizer_url` (text): Where its tokenizer's configuration lives.

**Example output**

```json
{
  "context_length": 128000,
  "default_for": [
    "chat"
  ],
  "endpoints": [
    "chat"
  ],
  "features": [
    "tools",
    "json_mode",
    "vision",
    "reasoning"
  ],
  "is_deprecated": false,
  "is_fine_tuned": false,
  "name": "command-a-plus-05-2026",
  "sampling_defaults": {
    "p": 0.75,
    "temperature": 0.3
  },
  "tokenizer_url": "https://storage.googleapis.com/cohere-public/tokenizers/command-a-plus-05-2026.json"
}
```

### List models

List the Cohere models this API key can use, with what each is for, how much text it takes in and the abilities it has.

**Inputs**

- What it's for (`endpoint`, text): Only models that do this. One of: `all` (Anything), `chat`, `embed` (Embeddings), `rerank` (Reranking). Default: `all`.

**Outputs**

- `count` (number): How many there are.
- `model_names` (list): Every model's name, in the same order.
- `models` (list): The models, by name.

**Example output**

```json
{
  "count": 1,
  "model_names": [
    "command-a-plus-05-2026"
  ],
  "models": [
    {
      "context_length": 128000,
      "default_for": [
        "chat"
      ],
      "endpoints": [
        "chat"
      ],
      "features": [
        "tools",
        "json_mode",
        "vision",
        "reasoning"
      ],
      "is_deprecated": false,
      "is_fine_tuned": false,
      "name": "command-a-plus-05-2026"
    }
  ]
}
```

### Parse a document

Turn a PDF, a scan or a photo of a document into Markdown with Cohere Parse, keeping its reading order, lists and tables, and describing its pictures. Reads up to 20 pages a step.

**Inputs**

- Document (`document`, text, required): The PDF or page image to parse: upload a file, pick one an earlier step produced, or paste a link to one.
- First page (`first_page`, number): For a PDF, the first page to parse. Leave blank to start at page 1. At least 1.
- Last page (`last_page`, number): For a PDF, the last page to parse. Leave blank to go to the end; a step parses up to 20 pages. At least 1.

**Outputs**

- `markdown` (text): Every page parsed, as one Markdown text.
- `model` (text): The model used.
- `page_count` (number): How many pages were parsed.
- `pages` (list): Each page, in order.

**Example output**

```json
{
  "markdown": "# Invoice INV-1042\n\n<table><tr><td>Total</td><td>$1,250.00</td></tr></table>",
  "model": "parse-v5.0",
  "page_count": 1,
  "pages": [
    {
      "images": [],
      "markdown": "# Invoice INV-1042\n\n<table><tr><td>Total</td><td>$1,250.00</td></tr></table>",
      "page": 1
    }
  ]
}
```

### Rank documents by relevance

Order a list of texts or records by how well each answers a question, best first, with a score from 0 to 1. Useful for picking the passages or rows to hand an AI step.

**Inputs**

- Question (`query`, text, required): What you are looking for, written as a question or a search.
- Documents (`documents`, list, required): The texts or records to rank, one per entry; up to 1,000. Records are ranked on all of their fields.
- How many to return (`top_n`, number): Keep only the best matches. Leave blank to rank them all. At least 1.
- Model (`model`, text): Which Rerank model to use. One of: `rerank-v4.0-pro` (Rerank 4 Pro (most accurate, recommended)), `rerank-v4.0-fast` (Rerank 4 Fast), `rerank-v3.5` (Rerank 3.5), `rerank-multilingual-v3.0` (Rerank Multilingual 3), `rerank-english-v3.0` (Rerank English 3). Default: `rerank-v4.0-pro`.

**Outputs**

- `count` (number): How many were returned.
- `model` (text): The model used.
- `query` (text): The question.
- `results` (list): The documents, best match first.
- `top_document` (text): The best match's text.
- `top_position` (number): Where the best match was in the list, from 1.
- `top_score` (number): The best match's score, from 0 to 1.

**Example output**

```json
{
  "count": 2,
  "model": "rerank-v4.0-pro",
  "query": "What is the capital of France?",
  "results": [
    {
      "document": "Paris is the capital of France.",
      "position": 2,
      "rank": 1,
      "score": 0.98
    },
    {
      "document": "The Loire is France's longest river.",
      "position": 1,
      "rank": 2,
      "score": 0.07
    }
  ],
  "top_document": "Paris is the capital of France.",
  "top_position": 2,
  "top_score": 0.98
}
```

### Transcribe audio

Write down what is said in a recording with Cohere Transcribe, in any of 14 languages. Takes MP3, WAV, FLAC or OGG recordings of up to 25 MB.

**Inputs**

- Recording (`recording`, text, required): The recording to transcribe: upload a file, pick one an earlier step produced, or paste a link to one.
- Language (`language`, text): The language being spoken. Cohere Transcribe does not detect it, so pick the one the recording is in. One of: `en` (English), `ar` (Arabic), `zh` (Chinese), `nl` (Dutch), `fr` (French), `de` (German), `el` (Greek), `it` (Italian), `ja` (Japanese), `ko` (Korean), and 4 more. Default: `en`.
- Model (`model`, text): Which Cohere Transcribe model listens. One of: `cohere-transcribe-03-2026` (Cohere Transcribe (recommended)), `cohere-transcribe-arabic-07-2026` (Cohere Transcribe Arabic (for Arabic speech)). Default: `cohere-transcribe-03-2026`.

**Outputs**

- `language` (text): The language listened for, as a code.
- `model` (text): The model used.
- `text` (text): What was said.
- `word_count` (number): How many words were heard.

**Example output**

```json
{
  "language": "en",
  "model": "cohere-transcribe-03-2026",
  "text": "Thanks for calling Acme support, how can I help you today?",
  "word_count": 11
}
```

### Translate text

Translate text into another language with Command A Translate, Cohere's model built for translation in 23 languages, or North Small Translate for more than 50.

**Inputs**

- Text (`text`, text, required): The text to translate.
- Translate into (`target_language`, text, required): The language to translate into, such as Spanish, Japanese or Brazilian Portuguese.
- Translate from (`source_language`, text): The language the text is in. Leave blank to let the model tell.
- Instructions (`instructions`, text): How to translate, such as 'Keep a formal tone' or 'Leave product names in English'.
- Model (`model`, text): Which Cohere model translates. One of: `command-a-translate-08-2025` (Command A Translate (23 languages, recommended)), `north-small-translate-09-2026` (North Small Translate (50+ languages)), `command-a-plus-05-2026` (Command A+). Default: `command-a-translate-08-2025`.

**Outputs**

- `finish_reason` (text): COMPLETE when it finished, MAX_TOKENS when it was cut off, STOP_SEQUENCE when it stopped at a stop word.
- `input_tokens` (number): Tokens read, as billed.
- `model` (text): The model that answered.
- `output_tokens` (number): Tokens written, as billed.
- `source_language` (text): The language it was translated from, if given.
- `target_language` (text): The language it was translated into.
- `translation` (text): The translated text.
- `was_cut_off` (true/false): Whether it hit the maximum response length.

**Example output**

```json
{
  "finish_reason": "COMPLETE",
  "input_tokens": 41,
  "model": "command-a-translate-08-2025",
  "output_tokens": 17,
  "source_language": null,
  "target_language": "Spanish",
  "translation": "Los reembolsos se emiten en un plazo de 5 d\u00edas h\u00e1biles.",
  "was_cut_off": false
}
```
