Together Link is currently in beta. Commands, routing behavior, and the
available model list may change. Report issues or give feedback on
GitHub.
Requirements
- A Together API key.
- macOS or Linux, with Bash and curl to run the installer. On Linux, installing Bun also requires unzip.
- The coding agent or desktop app you want to use, already installed. Together Link supports Claude Code, Codex, OpenCode 2, Pi Code 0.80.8 or newer (which requires Node.js 22.19 or newer), Claude Desktop, and ChatGPT Desktop.
- Optional: an Anthropic API key. In Claude Code and Claude Desktop sessions, the auto router uses it to send difficult requests to Claude Opus, billed to the Anthropic account behind the key. Without one, every request is served by a Together AI model.
Get started
Install Together Link:~/.local/bin, and opens the interactive launcher when it finishes. If the togetherlink command isn’t found in a new terminal, follow the PATH instructions printed at the end of installation.
Open the interactive launcher at any time:
tlink alias runs the same command.
Choose the tool to launch: Claude Code, Codex, OpenCode, Pi Code, Claude Desktop, or ChatGPT Desktop. If no Together API key is configured, the launcher prompts you for one.
Arguments after the tool name pass through to the agent. For example, togetherlink claude -p "hello" runs Claude Code in print mode.
Every session starts with a banner that names the tool and the route serving it, such as Claude Code › Auto.
You can also launch a tool directly:
Configure your API key
Save your Together API key:--api-key first, then from its saved configuration, then from the TOGETHER_API_KEY environment variable. It doesn’t read .env files in your project.
Configuration optionally asks for an Anthropic API key for auto router sessions in Claude Code and Claude Desktop. Skip it to use Together AI models only.
How the auto router works
Sessions use the virtualauto model by default. For each request, Together Link’s cloud gateway classifies the prompt and routes it to the model best suited to handle it:
- Straightforward requests: Served by Together AI models such as GLM 5.3, billed at standard serverless rates.
- More difficult requests: In Claude Code and Claude Desktop sessions with an Anthropic API key configured, served by Claude Opus through Anthropic and billed to the Anthropic account behind the key.
Choose a model
List available models, context limits, and pricing:togetherlink command and pass --main with the model ID before the tool name:
togetherlink --main zai-org/GLM-5.3-Flash opencode.
Together Link currently offers these models:
You can also switch models during a session with your agent’s
/model command. In Claude Code, the menu maps Claude’s model tiers to Together AI models: Opus runs Kimi K3, Fable runs GLM 5.3, Sonnet runs GLM 5.3 Flash, and Haiku runs DeepSeek V4.1 Flash. Codex, OpenCode, and Pi Code list the Together AI models by name.
Desktop apps expose their own model menus, which can differ from the terminal tools.
Usage on Together AI models is billed at standard serverless rates for the model that serves each request. See serverless models for current pricing.
How it works
Together Link configures each tool to connect directly to its hosted gateway, which serves each request from a Together AI model or from Anthropic based on the selected route. No local proxy or daemon runs, and your normal configuration files remain unchanged.- Claude Code, Codex, OpenCode, and Pi Code: Receive a temporary, per-launch configuration that is removed when the session ends.
- Claude Desktop and Cowork: Use a persistent Together Link-owned third-party profile, with backups for reversible setup.
- ChatGPT Desktop: Uses a dedicated profile at
~/.codex-togetherlink. Together Link reads but never rewrites your normal~/.codexhome.
Codex CLI
Launch Codex in your terminal:~/.codex. Codex’s native web search works as usual.
OpenCode
Launch OpenCode in your terminal:Pi Code
Launch Pi Code in your terminal:pi.
Native arguments pass through to Pi Code:
Claude Desktop and Cowork
Enable the integration:/Applications or ~/Applications. On Linux, the claude-desktop command must be on your PATH.
Switch back to official Claude while keeping your Together Link profile available:
ChatGPT Desktop
Launch ChatGPT Desktop with your Together Link profile:~/.codex home remains untouched.
Run headless
Together Link works in non-interactive contexts, so scripts and agents can drive a coding agent. Each tool’s own headless flags pass through:Generate images
Claude Code, Claude Desktop, and ChatGPT Desktop sessions launched through Together Link include an image generation skill. Ask for an image, and your agent generates or edits it with image models hosted by Together AI:togetherlink usage, tracked separately from token usage.
View usage
Each session prints a cost summary when it exits. In Claude Code, the status line also shows an estimated spend for the session alongside what the same tokens would cost on Claude Opus. To see spend tracked by the cloud gateway across sessions, run:Update Together Link
Together Link periodically checks for updates. You can also update manually:Troubleshooting
togetherlink: command not found: Open a new terminal, or load the startup file the installer updated (source ~/.zshrcfor Zsh,source ~/.bashrcfor Bash).- No API key configured: Run
togetherlink configureor exportTOGETHER_API_KEY. Keys in a project.envfile aren’t read. - A coding agent is not installed: Together Link doesn’t install Claude Code, Codex, OpenCode, or Pi Code. Install the tool with the command printed in the error, then retry.
- OpenCode 1 is installed: Together Link supports only OpenCode 2. Remove OpenCode 1 (for example,
npm uninstall -g opencode-ai), then install OpenCode 2 withnpm install -g @opencode/cli@latest. - Pi Code is too old: Together Link needs Pi Code 0.80.8 or newer. Run
pi update self, or reinstall withnpm install -g --ignore-scripts @earendil-works/pi-coding-agent. Current Pi Code releases need Node.js 22.19 or newer. On an older Node.js, npm installs the legacy 0.74 release, which Together Link rejects. - A headless run hangs: Append
< /dev/nullto close stdin. - Restore your original setup: Stop using
togetherlinkand launch your tool directly. Together Link never modifies your normal configuration files.
Related resources
Together Link on GitHub
Report issues and give feedback.
Together AI models
Browse every model hosted on Together AI.