Run leading open-source models on Together AI with a few lines of code. Follow the steps below to get started.Documentation Index
Fetch the complete documentation index at: https://docs.together.ai/llms.txt
Use this file to discover all available pages before exploring further.
Step 1: Create an API key
Register for an account if you don’t have one. Then go to your project’s API keys page, select Create key, give it a name, and copy the value. Next, export the key as an environment variable in your terminal:TOGETHER_API_KEY automatically when you call Together(). Pass api_key= to the constructor to override it.
Step 2: Install the SDK
Together AI publishes official SDKs for Python and TypeScript. Install the SDK with your preferred package manager:Step 3: Run your first query
The example below sends a chat completion request and prints the response:stream=True (Python) or stream: true (TypeScript/cURL) and iterate over the response chunks:
Congrats! You just made your first request to Together AI. The same client works for multi-turn conversations, function calling, structured outputs, image generation, and audio transcription.
Next steps
Choose a model
Browse the catalog of models for chat, coding, vision, and reasoning.
Dedicated endpoints
Reserve GPUs for steady traffic or fine-tuned models.
Fine-tune a model
Train a model on your own data with LoRA, DPO, or full fine-tuning.
GPU clusters
Run large-scale training and custom workloads on dedicated GPU clusters.