Claude Max
If you already pay for a Claude subscription (Claude Pro, Claude Max, or a Claude Team/Enterprise plan that includes Claude Code), the Cosine CLI can route inference through your existing subscription instead of using Cosine credits.
Unlike ChatGPT, there is no cos login-with-claude command. Cosine reuses the authentication you already have on disk for Anthropic’s Claude Code CLI: you log in to Claude in your terminal, and cos picks up those credentials when it runs.
Quick Setup
Section titled “Quick Setup”Use this path if you have not set up Claude Code on this machine yet.
1. Install Claude Code
Section titled “1. Install Claude Code”Install Anthropic’s Claude Code CLI by following the official Claude Code installation guide.
After installation, open a new terminal and confirm the claude command is available:
claude --version2. Sign in to Claude
Section titled “2. Sign in to Claude”Start Claude Code from your terminal:
claudeFollow the browser sign-in flow and choose the Claude account that has Claude Code access. The free Claude.ai plan does not include Claude Code access, so you need Claude Pro, Claude Max, Team, Enterprise, or a supported Console/API setup.
When the Claude Code prompt opens successfully, your local Claude authentication is ready.
3. Start Cosine from the same environment
Section titled “3. Start Cosine from the same environment”From the same terminal environment where claude works, start Cosine:
cosThen open the model picker with /model and choose a model under Claude Subscription. Cosine will route those requests through your local claude command.
How It Works
Section titled “How It Works”When you select a Claude Subscription model:
- Local routing: Cosine spawns the
claudebinary on your machine and proxies requests through it. No prompts are sent to Cosine’s inference endpoint for these models. - Credential reuse: Authentication is provided entirely by
claude. Cosine never sees, stores, or transmits your Anthropic credentials. - Subscription billing: Token usage counts against your Claude subscription quotas, not your Cosine credits.
Custom install location
Section titled “Custom install location”By default, Cosine looks for the claude binary on your PATH. If you’ve installed Claude Code somewhere else, set CLAUDE_CODE_CLI_PATH before launching cos:
export CLAUDE_CODE_CLI_PATH=/path/to/claudecosTroubleshooting
Section titled “Troubleshooting””Claude Max runs locally through the Claude Code CLI”
Section titled “”Claude Max runs locally through the Claude Code CLI””This dialog appears when Cosine cannot find the claude binary. Install Claude Code and make sure claude is available on your PATH, or set CLAUDE_CODE_CLI_PATH as shown above.
To check whether your shell can find Claude Code, run:
which claudeOn Windows PowerShell, use:
Get-Command claude“Claude Max is installed but not yet authenticated”
Section titled ““Claude Max is installed but not yet authenticated””The claude binary was found, but it does not have valid credentials. Run claude login in your terminal and then re-select the model in Cosine.
Authentication errors mid-session
Section titled “Authentication errors mid-session”If your Claude subscription tokens expire or are revoked while a session is running, Cosine will surface the underlying error from claude. Re-run claude login and retry the request.
Switching Authentication Methods
Section titled “Switching Authentication Methods”The CLI supports multiple authentication methods at the same time. Switch by selecting a different model in the model picker:
- Cosine Account – billed against Cosine credits (
cos login) - ChatGPT subscription – billed against your OpenAI account (
cos login-with-chatgpt) - Claude subscription – billed against your Anthropic account (this page)
See Also
Section titled “See Also”- Install & Authenticate – General CLI authentication options
- ChatGPT – Use your OpenAI subscription
- Configuration – Detailed configuration reference