Skip to content

Together AI

Setup

Get your API key from Together AI, and export it as an environment variable:

export TOGETHER_API_KEY=<YOUR_TOGETHER_API_KEY>

Examples

from toolfront import Database

db = Database("postgresql://user:pass@host/db")

# Meta Llama model via Together AI
result = db.ask(..., model="together:meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo")

# Qwen model via Together AI
result = db.ask(..., model="together:Qwen/Qwen2.5-72B-Instruct-Turbo")

Together AI Model Names

Always specify a Together AI model with the together: prefix.