Together AI
Together AI aggregates models from multiple providers with enhanced features like rate limiting and failover. Access 6 models through Mastra’s model router.
Learn more in the Together AI documentation .
Usage
import { Agent } from "@mastra/core";
const agent = new Agent({
name: "my-agent",
instructions: "You are a helpful assistant",
model: "togetherai/Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8"
});
Mastra uses the OpenAI-compatible /chat/completions
endpoint. Some provider-specific features may not be available. Check the Together AI documentation for details.
Configuration
# Use gateway API key
TOGETHERAI_API_KEY=your-gateway-key
# Or use provider API keys directly
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=ant-...
Available Models
Model |
---|
Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8 |
deepseek-ai/DeepSeek-R1 |
deepseek-ai/DeepSeek-V3 |
meta-llama/Llama-3.3-70B-Instruct-Turbo |
moonshotai/Kimi-K2-Instruct |
openai/gpt-oss-120b |