Skip to main content
You are currently on a page documenting the use of Together AI models as text completion models. Many popular Together AI models are chat completion models.You may be looking for this page instead.
Together AI offers an API to query 50+ leading open-source models in a couple lines of code. This example goes over how to use LangChain to interact with Together AI models.

Installation

Environment

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

Example