# CohereEmbeddings

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/embeddings/cohere/CohereEmbeddings)

Cohere embedding models.

To use, you should have the ``cohere`` python package installed, and the
environment variable ``COHERE_API_KEY`` set with your API key or pass it
as a named parameter to the constructor.

## Signature

```python
CohereEmbeddings()
```

## Description

**Example:**

.. code-block:: python

from langchain_community.embeddings import CohereEmbeddings
cohere = CohereEmbeddings(
    model="embed-english-light-v3.0",
    cohere_api_key="my-api-key"
)

## Extends

- `BaseModel`
- `Embeddings`

## Properties

- `client`
- `async_client`
- `model`
- `truncate`
- `cohere_api_key`
- `max_retries`
- `request_timeout`
- `user_agent`
- `model_config`

## Methods

- [`validate_environment()`](https://reference.langchain.com/python/langchain-community/embeddings/cohere/CohereEmbeddings/validate_environment)
- [`embed_with_retry()`](https://reference.langchain.com/python/langchain-community/embeddings/cohere/CohereEmbeddings/embed_with_retry)
- [`aembed_with_retry()`](https://reference.langchain.com/python/langchain-community/embeddings/cohere/CohereEmbeddings/aembed_with_retry)
- [`embed()`](https://reference.langchain.com/python/langchain-community/embeddings/cohere/CohereEmbeddings/embed)
- [`aembed()`](https://reference.langchain.com/python/langchain-community/embeddings/cohere/CohereEmbeddings/aembed)
- [`embed_documents()`](https://reference.langchain.com/python/langchain-community/embeddings/cohere/CohereEmbeddings/embed_documents)
- [`aembed_documents()`](https://reference.langchain.com/python/langchain-community/embeddings/cohere/CohereEmbeddings/aembed_documents)
- [`embed_query()`](https://reference.langchain.com/python/langchain-community/embeddings/cohere/CohereEmbeddings/embed_query)
- [`aembed_query()`](https://reference.langchain.com/python/langchain-community/embeddings/cohere/CohereEmbeddings/aembed_query)

## ⚠️ Deprecated

Deprecated since version 0.0.30.

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/4b280287bd55b99b44db2dd849f02d66c89534d5/libs/community/langchain_community/embeddings/cohere.py#L11)