Setting up Together AI with OpenClaw
I find it frustrating to manage multiple API endpoints just to experiment with different open-source models. Switching between a coding model and a vision model often requires changing authentication logic or base URLs, which interrupts the workflow. Together AI handles this by providing a single OpenAI-compatible API for various models.
What You’ll Need
Section titled “What You’ll Need”- A Together AI account
- A
TOGETHER_API_KEY - OpenClaw installed on your system
Quick Start
Section titled “Quick Start”I recommend storing your API key directly for the Gateway to use. You can get started with this command:
openclaw onboard --auth-choice together-api-keyAfter that, update your configuration to set a default model. I use this JSON5 structure:
{ agents: { defaults: { model: { primary: "together/moonshotai/Kimi-K2.5" }, }, },}If you prefer to automate the setup without interactive prompts, use the following command:
openclaw onboard --non-interactive \ --mode local \ --auth-choice together-api-key \ --together-api-key "$TOGETHER_API_KEY"This sets together/moonshotai/Kimi-K2.5 as your default choice.
Troubleshooting
Section titled “Troubleshooting”If you run the Gateway as a daemon using launchd or systemd, the process might fail to find your API key. I make sure the TOGETHER_API_KEY is available to the process by adding it to ~/.clawdbot/.env or using env.shellEnv.
What’s Next
Section titled “What’s Next”You can now use several open-source models through the together provider:
- Llama 3.3 70B Instruct Turbo: Fast instruction following.
- DeepSeek V3.1: Model for coding and reasoning.
- Llama 4 Scout: Vision model for image understanding.
- Kimi K2 Instruct: High-performance model with a 262K context window.
If you need help with other providers, check out the AI Setup Assistant.
OpenClaw Expert
Still stuck?
If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.