---
title: cohere_embeddings
page-cloud: true
latest-operator-version: v26.2.6
latest-console-tag: v3.14.0
latest-connect-version: 4.118.0
latest-redpanda-tag: v26.2.7
docname: connect/components/processors/cohere_embeddings
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: connect/components/processors/cohere_embeddings.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/develop/pages/connect/components/processors/cohere_embeddings.adoc
description: Generates vector embeddings to represent input text, using the Cohere API.
page-self-managed-available: "true"
page-self-managed-available-url: https://docs.redpanda.com/connect/components/processors/cohere_embeddings/
page-git-created-date: "2024-10-16"
page-git-modified-date: "2026-11-10"
page-generated-sources:
  - include: connect:components:partial$descriptions/processors/cohere_embeddings.adoc
    generator: null
    version: null
    source: the component specs in https://github.com/redpanda-data/connect
page-generated-content: partial
---

# cohere_embeddings

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

<!-- Source: https://docs.redpanda.com/cloud-data-platform/develop/connect/components/processors/cohere_embeddings.md -->

Generates vector embeddings to represent input text, using the Cohere API.

This processor sends text strings to the Cohere API, which generates vector embeddings. By default, the processor submits the entire payload of each message as a string, unless you use the `text_mapping` configuration field to customize it.

To learn more about vector embeddings, see the [Cohere API documentation](https://docs.cohere.com/docs/embeddings).

#### Common

```yml
processor:
  label: ""
  cohere_embeddings:
    base_url: https://api.cohere.com
    api_key: "" # No default (required)
    model: "" # No default (required)
    text_mapping: "" # No default (optional)
    input_type: search_document
    dimensions: 0 # No default (optional)
```

#### Advanced

```yml
processor:
  label: ""
  cohere_embeddings:
    base_url: https://api.cohere.com
    api_key: "" # No default (required)
    model: "" # No default (required)
    text_mapping: "" # No default (optional)
    input_type: search_document
    dimensions: 0 # No default (optional)
```

## Examples

### Store embedding vectors in Qdrant

Computes embeddings for some generated data and stores them in [Qdrant](https://docs.redpanda.com/cloud-data-platform/develop/connect/components/outputs/qdrant/).

```yaml
input:
  generate:
    interval: 1s
    mapping: |
      root = {"text": fake("paragraph")}
pipeline:
  processors:
  - cohere_embeddings:
      model: embed-english-v3
      api_key: "${COHERE_API_KEY}"
      text_mapping: "root = this.text"
output:
  qdrant:
    grpc_host: localhost:6334
    collection_name: "example_collection"
    id: "root = uuid_v4()"
    vector_mapping: "root = this"
```

## Fields

### `api_key`

Your API key for the Cohere API.

> ⚠️ **CAUTION**
>
> This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see [Manage Secrets](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/secret-management/) before adding it to your configuration.

**Type**: `string`

### `base_url`

The base URL to use for API requests.

**Type**: `string`

**Default**: `https://api.cohere.com`

### `dimensions`

The number of dimensions (numerical values) in each vector embedding generated by this processor. This parameter only supports [`embed-v4.0`](https://docs.cohere.com/v2/docs/embeddings) and newer models. Possible values are `256`, `512`, `1024`, and `1536`.

**Type**: `int`

### `input_type`

The type of text input passed to the model.

**Type**: `string`

**Default**: `search_document`

| Option | Summary |
| --- | --- |
| `classification` | Used for embeddings passed through a text classifier. |
| `clustering` | Used for the embeddings run through a clustering algorithm. |
| `search_document` | Used for embeddings stored in a vector database for search use-cases. |
| `search_query` | Used for embeddings of search queries run against a vector DB to find relevant documents. |

### `model`

The name of the Cohere model you want to use.

**Type**: `string`

```yaml
# Examples:
model: embed-english-v3.0

# ---

model: embed-english-light-v3.0

# ---

model: embed-multilingual-v3.0

# ---

model: embed-multilingual-light-v3.0
```

### `text_mapping`

A Bloblang mapping that returns the text you want to generate vector embeddings for. By default, the processor submits the entire payload of each message as a string.

**Type**: `string`