https://api.together.ai/v1 and supplying your Together API key. The integrations below ship dedicated Together support, with first-class clients, helpers, or providers.
For agent frameworks (CrewAI, LangGraph, DSPy, PydanticAI, AutoGen, Agno, Composio), see the dedicated pages under Framework integrations. If you’re migrating from the v1 Python SDK, see the Python SDK v2 migration appendix.
Integration guides
Each of these integrations has a dedicated guide with installation steps and runnable examples:Hugging Face
Call Together models through Hugging Face Inference clients and the Hub’s provider routing.
Vercel AI SDK
Generate text, stream, call tools, and get structured outputs with the
@ai-sdk/togetherai provider.Mastra
Point Mastra’s model router at Together models to build agents and workflows.
Next.js
Build a streaming chat app with the Together SDK, the Vercel AI SDK, or Mastra.
LangChain
LangChain is a framework for building context-aware, reasoning applications powered by LLMs. Thelangchain-together package provides chat models and embeddings.
Shell
Python
LlamaIndex
LlamaIndex is a data framework for connecting custom data sources to LLMs. Together AI works with LlamaIndex through theOpenAILike LLM and dedicated embedding classes.
Shell
Python
LiteLLM
LiteLLM is an open-source gateway with a single OpenAI-format interface for over 100 LLM providers, available as a Python SDK and a proxy server. LiteLLM 1.100.0 and later ships official Together AI support, with a model registry that syncs against the serverless catalog daily.Shell
Python
stream=True), function calling (tools), JSON mode (response_format), and reasoning_effort all pass through in the OpenAI format. Reasoning models return their reasoning in a separate reasoning_content field, so content holds only the final answer.
To run Claude Code on Together models through the LiteLLM proxy, see the LiteLLM + Claude Code guide.
Helicone
Helicone is an open-source LLM observability platform. Route Together requests through Helicone’s gateway by overridingbase_url and adding the auth header.
Agent frameworks
Each framework below has a dedicated guide with installation, model selection, and runnable examples:- CrewAI: Open-source orchestration for multi-agent workflows.
- LangGraph: Stateful, multi-actor applications built on LangChain.
- DSPy: Modular AI systems written in code instead of prompt strings.
- PydanticAI: Typed agent framework from the Pydantic team.
- AutoGen (AG2): Conversational multi-agent systems.
- Agno: Open-source library for multimodal agents.
- Composio: Tool-use platform for connecting agents to external services.