Login
Log in with your browser. If you don’t have a Together AI account yet, you can create one during login.--json or --non-interactive, it can’t ask, so run tg switch after you log in.
Parameters
Switch
Scope the CLI to a different project. Commands you run afterward act in that project.tg login before you switch.
Logout
Remove your stored credentials and end your login sessions.TOGETHER_API_KEY if it’s set.
Credential precedence
The CLI uses the first credential it finds, in this order:- The
--api-keyflag. - Your
tg loginsession. - The
TOGETHER_API_KEYenvironment variable.
TOGETHER_API_KEY. To use an API key instead, pass --api-key or run tg logout.
Only the CLI reads your login credentials. The Python and TypeScript SDKs, and the cURL examples in these docs, authenticate with an API key from TOGETHER_API_KEY.