# Together

> **Class** in `langchain_together`

📖 [View in docs](https://reference.langchain.com/python/langchain-together/llms/Together)

LLM models from `Together`.

To use, you'll need an API key which you can find here:
https://api.together.ai/settings/api-keys. This can be passed in as init param
``together_api_key`` or set as environment variable ``TOGETHER_API_KEY``.

Together AI API reference: https://docs.together.ai/reference/completions

## Signature

```python
Together()
```

## Description

**Example:**

.. code-block:: python

from langchain_together import Together

model = Together(model_name="mistralai/Mixtral-8x7B-Instruct-v0.1")

## Extends

- `LLM`

## Properties

- `base_url`
- `together_api_key`
- `model`
- `temperature`
- `top_p`
- `top_k`
- `max_tokens`
- `repetition_penalty`
- `logprobs`
- `model_config`
- `default_params`

## Methods

- [`validate_environment()`](https://reference.langchain.com/python/langchain-together/llms/Together/validate_environment)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-together/blob/1a6545d022497fbef3b414258a985d96b02a1963/libs/together/langchain_together/llms.py#L20)