Skip to main content
You can use the Together CLI to manage your Together AI resources from your terminal, or using automated systems. Use the Together CLI to deploy endpoints, fine-tune models, manage your GPU clusters, and more.

Install the Together CLI

Requires Python 3.10+ and uv.
Run the following command to install the CLI:
The [cli] extra target includes additional dependencies used by the CLI. The extra target prevents the Python SDK from being bloated with dependencies it does not use.
The CLI is also installed as together, an alias of tg that’s identical in behavior. Examples throughout these docs use tg.
Migrating from a pip-installed CLI? An earlier pip install together can pin the CLI to an older Python interpreter and leave a stale tg binary earlier on your PATH, which shadows the uv-managed install. Commands that need a newer CLI (such as OIDC SSH into clusters, which requires 2.40+) then fail even after you upgrade. To switch to the uv-managed install:
  1. Uninstall the pip package: pip uninstall together.
  2. Reload your shell (or run hash -r) so PATH resolves to the uv-managed binary.
  3. Reinstall: uv tool install "together[cli]".
  4. Confirm the version: tg --version.

Upgrade notices

The CLI checks PyPI in the background for a newer release and caches the result for 24 hours. When one is available, it prints an upgrade notice at most once per day. In an interactive terminal it also offers to run the upgrade for you, using the command that matches your install (uv, pipx, or pip). With --json or --non-interactive, it prints the upgrade command instead. To disable the check entirely (for example, in CI), set:
Shell

Authenticate

Log in with your browser:
The CLI opens a browser window where you approve the login, then scopes the CLI to one of your projects. To work in a different project, run tg switch.

Authenticate with an API key

For CI/CD, scripts, and other environments where you can’t log in with a browser, authenticate with an API key instead. Find your API key in your account settings, then set it as an environment variable:
Shell
While you’re logged in with tg login, the CLI uses your login instead of TOGETHER_API_KEY. To use the API key, pass --api-key or run tg logout.

Use the CLI in a CI/CD environment

uvx is a helper utility from uv that downloads and runs a Python binary without a separate install step. In a CI/CD environment, invoke the CLI directly with uvx:
In CI/CD, set TOGETHER_API_KEY instead of passing --api-key so the key doesn’t appear in process lists or logs. If both are provided, --api-key takes precedence over the environment variable.

Available commands

login, switch, and logout

Log in with your browser, switch between projects, and log out.
Learn more about the login commands.

models

Manage the models you deploy with dedicated model inference. Browse supported models, or register your own models and adapters and upload their weights.
Learn more about the models command.

endpoints

Deploy models to dedicated endpoints, then manage each endpoint’s deployments, traffic, and rollouts.
Learn more about the endpoints command.

files

Upload and manage datasets for use in fine-tuning, evals, and batch inference.
Learn more about the files command.

fine-tuning

Create and manage fine-tuning jobs, then download the model weights they produce.
Learn more about the fine-tuning command.

evals

Manage model evaluation jobs.
Learn more about the evals command.

batches

Submit and manage batch inference jobs.
Learn more about the batches command.

clusters

Reserve, manage, and interact with GPU clusters.
Learn more about the clusters command.

jig (beta)

Build, deploy, and manage dedicated containers.
Learn more about the jig command.

projects

List the projects your current credentials can access.
Learn more about the projects command.

whoami

Show the project and organization your current credentials belong to.
Learn more about the whoami command.

Beta commands

The beta namespace provides access to experimental features and new capabilities before they become part of the standard API. Features in the beta namespace are largely considered stable. However, these features are subject to change and may be modified or removed in future releases.

Command aliases

Several commands and subcommands have shorthand aliases:

Global parameters

The following parameters are available on every command: