Skip to main content

Together AI

Together AI provides access to open-source models with OpenAI-compatible API.

Basic Example​

client<llm> MyClient {
provider "openai-generic"
options {
base_url "https://api.together.ai/v1"
api_key env.TOGETHER_API_KEY
model "meta-llama/Llama-3-70b-chat-hf"
}
}

BAML-Specific Options​

OptionTypeDefaultDescription
base_urlstring-https://api.together.ai/v1
api_keystringenv.TOGETHER_API_KEYAPI key
modelstring-Model identifier

Available Models​

ModelDescription
meta-llama/Llama-3-70b-chat-hfLlama 3 70B
meta-llama/Llama-3-8b-chat-hfLlama 3 8B
mistralai/Mixtral-8x7B-Instruct-v0.1Mixtral 8x7B
Qwen/Qwen2-72B-InstructQwen2 72B

See Together AI API compatibility for the complete list.

See Also​