> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langtrace.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Cohere

> Cohere is an AI company specializing in advanced natural language processing (NLP) technologies. They provide powerful language models and easy-to-use APIs for text generation, sentiment analysis, summarization, and more. Cohere's solutions can be customized and fine-tuned for specific tasks, making them ideal for applications in customer support, content creation, and real-time processing.

Using Langtrace to monitor your Cohere backed LLM apps is quick and easy. Follow these steps:

## Setup

1. Install Langtrace's SDK and [initialize](/quickstart) the SDK in your code.

*Note: You'll need API keys from Langtrace and Cohere. Sign up for [Langtrace](https://langtrace.ai) and/or [Cohere](https://cohere.com/) if you haven't done so already.*

```bash Python theme={null}
# Install the SDK
pip install -U langtrace-python-sdk cohere
```

2. Setup environment variables:

```bash Shell theme={null}
export LANGTRACE_API_KEY=YOUR_LANGTRACE_API_KEY
export COHERE_API_KEY=YOUR_COHERE_API_KEY
```

## Usage

Generate a simple output with your deployment's model:

<CodeGroup>
  ```python Python theme={null}
  # Imports import os
  import os
  from langtrace_python_sdk import langtrace # Must precede any llm module imports
  langtrace.init(api_key = os.environ['LANGTRACE_API_KEY'])
  import cohere
  co = cohere.Client(
      api_key=os.environ['COHERE_API_KEY'],
  )

  #  Lets query Cohere's command model
  chat = co.chat(
      message="What is Langchain?",
      model="command"
  )
  print(chat.text)
  ```
</CodeGroup>

You can now view your traces on the Langtrace dashboard:

<img src="https://mintcdn.com/langtraceai-2/hZpPXosaHdgAfpXF/images/cohere.png?fit=max&auto=format&n=hZpPXosaHdgAfpXF&q=85&s=096b48269a4536c1572db48d61ab7841" alt="traces" width="2096" height="833" data-path="images/cohere.png" />

Want to see more supported methods? Checkout the sample code in the [Langtrace Cohere Python Example](https://github.com/Scale3-Labs/langtrace-recipes/blob/main/integrations/language-model/cohere/starter.ipynb) repository.
