Together
Use Together AI models with Agno agents.
Together is a platform for providing endpoints for large language models. See the current serverless model catalog. Together retires model IDs on a rolling schedule, so verify availability and required capabilities before deployment.
We recommend experimenting to find the best-suited model for your use case.
Together uses dynamic per-model rate limits that adjust to your usage instead of fixed tiers. See the rate limit docs.
Authentication
Set your TOGETHER_API_KEY environment variable. Get your key from Together here.
export TOGETHER_API_KEY=***
export TOGETHER_MODEL_ID=your-model-idExample
Install the openai package:
uv pip install -U agno openaiUse Together with your Agent:
import os
from agno.agent import Agent
from agno.models.together import Together
agent = Agent(
model=Together(id=os.environ["TOGETHER_MODEL_ID"]),
markdown=True
)
# Print the response in the terminal
agent.print_response("Share a 2 sentence horror story.") View more examples here.
Params
| Parameter | Type | Default | Description |
|---|---|---|---|
id | str | "MiniMaxAI/MiniMax-M2.7" | The id of the Together model to use |
name | str | "Together" | The name of the model |
provider | str | "Together" | The provider of the model |
api_key | Optional[str] | None | The API key for Together (defaults to TOGETHER_API_KEY env var) |
base_url | str | "https://api.together.xyz/v1" | The base URL for the Together API |
Together also supports the params of OpenAI.