---
canonical_url: "https://docs.composio.dev/toolkits/cohere"
markdown_url: "https://docs.composio.dev/toolkits/cohere.md"
product: "platform"
version: null
last_updated: null
---

# Cohere

Cohere provides enterprise language and multimodal AI models for chat, embeddings, reranking, classification, and related workflows.

- **Category:** artificial intelligence
- **Auth:** API_KEY
- **Composio-managed OAuth available?** N/A
- **Tools:** 22
- **Triggers:** 0
- **Slug:** `COHERE`
- **Version:** 00000000_00

## Tools

### Cancel Batch

**Slug:** `COHERE_CANCEL_BATCH`

Cancel one in-progress Cohere batch. This requires a production Cohere API key, stops the batch irreversibly, and cannot be undone.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Cohere ID of the in-progress batch to cancel. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Cancel Embed Job

**Slug:** `COHERE_CANCEL_EMBED_JOB`

Irreversibly cancel one active Cohere asynchronous embed job by ID. Cohere accrued charges for work processed before cancellation still apply, and partial results are not available. Cancel only a caller-owned job. This action sends one request and does not poll for the cancelled state.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the active, caller-owned embed job to cancel. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Chat

**Slug:** `COHERE_CHAT`

Generate one non-streaming Cohere chat response from an ordered conversation, optionally using documents, tools, structured output, or reasoning controls.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `seed` | integer | No | Best-effort deterministic sampling seed. |
| `model` | string | Yes | Cohere chat model name; use COHERE_LIST_MODELS with endpoint=chat to discover current choices. |
| `tools` | array | No | Functions the model may call. |
| `top_k` | integer | No | Top-k sampling value; 0 disables top-k sampling. |
| `top_p` | number | No | Top-p probability mass from 0.01 to 0.99. |
| `logprobs` | boolean | No | Include generated-token log probabilities in the response. |
| `messages` | array | Yes | Conversation messages in chronological order. |
| `priority` | integer | No | Scheduling priority; lower numbers are handled earlier. |
| `thinking` | object | No | Reasoning enablement and optional token budget. |
| `documents` | array | No | Short relevant text or structured documents used to ground the answer. |
| `max_tokens` | integer | No | Maximum output tokens; low values may produce finish_reason=MAX_TOKENS. |
| `safety_mode` | string ("CONTEXTUAL" | "STRICT" | "OFF") | No | Safety instruction mode; model compatibility varies. |
| `temperature` | number | No | Generation randomness; lower values are more deterministic. |
| `tool_choice` | string ("REQUIRED" | "NONE") | No | REQUIRED asks the model to call at least one supplied tool. NONE asks the model not to call tools, but this is best-effort and model-dependent. |
| `strict_tools` | boolean | No | Force generated tool calls to follow the supplied function schemas strictly. |
| `stop_sequences` | array | No | Up to five strings that stop generation before the matching sequence. |
| `response_format` | object | No | Plain-text or structured JSON output configuration. |
| `citation_options` | object | No | Citation generation configuration. |
| `presence_penalty` | number | No | Presence-based repetition penalty from 0 to 1. |
| `frequency_penalty` | number | No | Frequency-based repetition penalty from 0 to 1. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Check API Key

**Slug:** `COHERE_CHECK_API_KEY`

Check whether the connected Cohere API key is valid and return its organization and owner identifiers when available.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Batch

**Slug:** `COHERE_CREATE_BATCH`

Start one asynchronous Cohere batch from an existing validated batch request dataset and return immediately without polling. Cohere requires a production API key for the Batch API.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | Human-readable name for the new batch. |
| `model` | string | Yes | Cohere model that will process the batch dataset. |
| `input_dataset_id` | string | Yes | Identifier of a validated Cohere batch request dataset. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Dataset

**Slug:** `COHERE_CREATE_DATASET`

Upload a Cohere dataset and start asynchronous validation. Returns immediately without waiting for validation to finish.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Primary CSV or JSONL dataset file to upload. |
| `name` | string | Yes | Dataset name; must contain fewer than 50 characters. |
| `type` | string ("embed-input" | "embed-result" | "cluster-result" | "cluster-outliers" | "reranker-finetune-input" | "single-label-classification-finetune-input" | "chat-finetune-input" | "multi-label-classification-finetune-input" | "batch-chat-input" | "batch-openai-chat-input" | "batch-embed-v2-input" | "batch-chat-v2-input") | Yes | Dataset type used by Cohere to validate the uploaded records. |
| `eval_data` | object | No | Optional evaluation CSV or JSONL dataset file to upload. |
| `keep_fields` | array | No | Source fields that must exist and should be retained in the dataset. |
| `csv_delimiter` | string | No | Single-character delimiter used to parse CSV uploads. |
| `text_separator` | string | No | Separator Cohere should use to split raw text uploads into records. |
| `optional_fields` | array | No | Source fields to retain when present without requiring them. |
| `keep_original_file` | boolean | No | Whether Cohere should retain the original uploaded file. |
| `skip_malformed_input` | boolean | No | Whether to drop malformed rows instead of failing validation. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Embed Job

**Slug:** `COHERE_CREATE_EMBED_JOB`

Start one asynchronous Cohere embedding job for a validated embed-input dataset and return immediately without polling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | Optional human-readable name for the embed job. |
| `model` | string | Yes | Cohere embedding model to use for the job. |
| `truncate` | string ("START" | "END") | No | Overlength behavior: START discards the beginning; END discards the end. |
| `dataset_id` | string | Yes | Validated Cohere embed-input dataset to process. |
| `input_type` | string ("search_document" | "search_query" | "classification" | "clustering" | "image") | Yes | How the resulting embeddings will be used: search_document, search_query, classification, clustering, or image. |
| `embedding_types` | array | No | Optional embedding encodings to produce: float, int8, uint8, binary, ubinary, or base64. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Dataset

**Slug:** `COHERE_DELETE_DATASET`

Permanently delete a Cohere dataset by ID. This deletion cannot be undone.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Cohere dataset ID to permanently delete. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Detokenize Tokens

**Slug:** `COHERE_DETOKENIZE_TOKENS`

Convert ordered Cohere token IDs back to text using the tokenizer for an explicit matching model.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model` | string | Yes | Cohere model whose tokenizer produced the token IDs; it must match the tokenization model. |
| `tokens` | array | Yes | Cohere token IDs to detokenize in order; use the exact order returned by tokenization. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Embed Inputs

**Slug:** `COHERE_EMBED_INPUTS`

Create v2 embeddings from exactly one input form: text strings, image data URIs, or structured multimodal content.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model` | string | Yes | Cohere embedding model name, such as embed-v4.0; discover choices with COHERE_LIST_MODELS endpoint=embed. |
| `texts` | array | No | One to 96 text strings to embed. Provide exactly one of texts, images, or inputs. |
| `images` | array | No | Image data URIs to embed. JPEG, PNG, WebP, and GIF are supported. Embed v3 accepts one image up to 5 MB; v4 and newer accept up to 20 MB of image data combined. |
| `inputs` | array | No | One to 96 structured multimodal inputs. Each input contains a non-empty ordered list of text or image_url blocks. |
| `priority` | integer | No | Scheduling priority; lower numbers are handled earlier. |
| `truncate` | string ("NONE" | "START" | "END") | No | Overlength behavior: NONE errors, START discards the beginning, and END discards the end. |
| `input_type` | string ("search_document" | "search_query" | "classification" | "clustering" | "image") | Yes | Purpose of the input: search_document, search_query, classification, clustering, or image. |
| `max_tokens` | integer | No | Maximum tokens embedded per input before applying truncate. |
| `embedding_types` | array | No | Vector encodings to return: float, int8, uint8, binary, ubinary, or base64. |
| `output_dimension` | integer ("256" | "512" | "1024" | "1536") | No | For embed-v4 and newer, output dimensions: 256, 512, 1024, or 1536. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Batch

**Slug:** `COHERE_GET_BATCH`

Retrieve one asynchronous Cohere batch's status and counters by batch ID. A usable batch ID depends on a production-key CREATE_BATCH lifecycle; this action performs one read only, and callers control any bounded polling.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Batch ID returned by CREATE_BATCH or LIST_BATCHES. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Dataset

**Slug:** `COHERE_GET_DATASET`

Retrieve one Cohere dataset by ID, including its asynchronous validation state, schema, files, parsing details, and metrics. Callers control any polling and should bound it.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Cohere dataset ID returned by a dataset create or list operation. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Dataset Usage

**Slug:** `COHERE_GET_DATASET_USAGE`

Read the organization's Cohere dataset-storage consumption in bytes.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Embed Job

**Slug:** `COHERE_GET_EMBED_JOB`

Retrieve one Cohere asynchronous embedding job's current status, model, and input and output dataset identifiers by job ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | Unique identifier of the embedding job to retrieve. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Model

**Slug:** `COHERE_GET_MODEL`

Retrieve a Cohere model's endpoint compatibility, context size, features, tokenizer, and default sampling parameters by model name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model` | string | Yes | Cohere model name to retrieve. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Batches

**Slug:** `COHERE_LIST_BATCHES`

Return one page of asynchronous Cohere batches and their statuses without creating or cancelling work.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `order_by` | string ("created_at" | "updated_at") | No | Sort batches by creation time or last-updated time. |
| `page_size` | integer | No | Maximum batches to return on this page (1-1000). |
| `next_cursor` | string | No | Continuation token returned by a prior call. Omit for the first page; pass the returned value back unchanged to fetch the next page. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Datasets

**Slug:** `COHERE_LIST_DATASETS`

Return one offset-based page of Cohere datasets, optionally filtered by type, validation status, or creation time. Cohere provides no total or continuation metadata, so callers control offset explicitly.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `after` | string | No | Return datasets created after this timestamp. |
| `limit` | integer | No | Maximum datasets to return on this page; must be positive. |
| `before` | string | No | Return datasets created before this timestamp. |
| `offset` | integer | No | Zero-based number of datasets to skip. Increase it by returned_count to request the following page. |
| `dataset_type` | string | No | Filter datasets by the type recorded on the dataset. |
| `validation_status` | string ("unknown" | "queued" | "processing" | "failed" | "validated" | "skipped") | No | Filter datasets by their current validation status. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Embed Jobs

**Slug:** `COHERE_LIST_EMBED_JOBS`

List Cohere asynchronous embedding jobs and their current statuses.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Models

**Slug:** `COHERE_LIST_MODELS`

Discover Cohere model names and capabilities, optionally filtered to an endpoint or its default model. Returns one page without auto-pagination.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `endpoint` | string ("chat" | "embed" | "classify" | "summarize" | "rerank" | "rate" | "generate") | No | Filter to models compatible with chat, embed, classify, summarize, rerank, rate, or generate. |
| `page_size` | integer | No | Requested models on this page (1-1000). The default of 1000 reduces exposure to Cohere's observed missing continuation token. |
| `next_cursor` | string | No | Continuation token from a prior response. Repeat the same endpoint and default_only filters when continuing; omit for the first page. |
| `default_only` | boolean | No | Return only the endpoint's default model. Requires endpoint. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Rerank Documents

**Slug:** `COHERE_RERANK_DOCUMENTS`

Rank text documents by relevance to a query and return the highest-scoring source documents.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model` | string | Yes | Cohere rerank model name; discover current choices with COHERE_LIST_MODELS endpoint=rerank. |
| `query` | string | Yes | Search query used to score the documents. |
| `top_n` | integer | No | Maximum highest-ranked results to return; must not exceed the number of documents. |
| `priority` | integer | No | Scheduling priority; lower numbers are handled earlier. |
| `documents` | array | Yes | Non-empty text documents to rank; result indexes refer to this zero-based array. |
| `max_tokens_per_doc` | integer | No | Maximum tokens considered from each document. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Tokenize Text

**Slug:** `COHERE_TOKENIZE_TEXT`

Convert text into token IDs with an explicit Cohere model. Detokenization must use the same model because token IDs differ between model tokenizers.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `text` | string | Yes | Text to tokenize, from 1 to 65,536 characters. |
| `model` | string | Yes | Model whose tokenizer to use. Use the same model when detokenizing these token IDs. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Transcribe Audio

**Slug:** `COHERE_TRANSCRIBE_AUDIO`

Transcribe an uploaded audio file to text with a Cohere transcription model.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file` | object | Yes | Audio file to transcribe. Supported file extensions are .flac, .mp3, .mpeg, .mpga, .ogg, and .wav. |
| `model` | string | Yes | Cohere transcription model ID. |
| `language` | string | Yes | Language of the audio in ISO-639-1 format. |
| `temperature` | number | No | Sampling temperature from 0 to 1; lower values are more deterministic. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
