The Together Python library comes with a command-line interface you can use to query Together's open-source models, upload new data files to your account, or manage your account's fine-tune jobs.

Prerequisites

Install the library

Launch your terminal and install or update the Together CLI with the following command:

pip install --upgrade together

Authenticate your shell

The CLI relies on the TOGETHER_API_KEY environment variable being set to your account's API token to authenticate requests. You can find your API token in your account settings.

ToΒ create an environment variable in the current shell, run:

export TOGETHER_API_KEY=xxxxx

You can also add it to your shell's global configuration so all new sessions can access it. Different shells have different semantics for setting global environment variables, so see your preferred shell's documentation to learn more.

Next steps

If you know what you're looking for, find your use case in the sidebar to learn more! The CLI is primarily used for fine-tuning so we recommend visiting Files or Fine-tuning.

To see all commands available in the CLI, run:

together --help