# Together

> **Class** in `langchain_community`

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

LLM models from `Together`.

To use, you'll need an API key which you can find here:
https://api.together.xyz/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/inference

## Signature

```python
Together()
```

## 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-community/llms/together/Together/validate_environment)
- [`get_user_agent()`](https://reference.langchain.com/python/langchain-community/llms/together/Together/get_user_agent)

## ⚠️ Deprecated

Deprecated since version 0.0.12.

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/a6a6079511ac8a5c1293337f88096b8641562e77/libs/community/langchain_community/llms/together.py#L21)