Overview
OneCLI injects your Anthropic credential into requests toapi.anthropic.com automatically. Agents make standard requests to the Anthropic API; the gateway adds the credential before forwarding.
This lets agents use Claude models (Claude Opus, Sonnet, Haiku) without ever seeing or handling your credential directly. For routing to Claude via Google Cloud instead, see Vertex AI. For a comparison of supported LLM providers, see LLM Providers.
Choose how to connect
sk-ant-admin...) can’t call Claude models, so OneCLI won’t use them.
Where to paste it
In the OneCLI dashboard, open your agent’s Models page, click Add LLM key, and choose Anthropic. Paste your token or key into Secret value and click Add Secret. Need help? in the window opens this page.
The Anthropic key window in OneCLI.
Option 1: Claude subscription token
Use this if you pay for a Claude plan. Usage counts against your plan instead of API billing. The free Claude plan doesn’t include Claude Code, so it can’t create a token.Open a terminal
- macOS: press
Cmd + Space, type Terminal, and press Enter. - Windows: press the Windows key, type PowerShell, and press Enter.
- Linux: open your terminal app (often
Ctrl + Alt + T).
Install Claude Code
~/.local/bin is not in your PATH, do the next step.
The installer finished. The Setup notes mean the claude command isn't on your PATH yet.
Make sure the claude command works
2.1.296 (Claude Code), skip to the next step. If you see command not found or not recognized, add the install folder to your PATH once, for your shell:macOS (zsh, the default):claude --version again.
After the PATH fix, claude --version prints the version.
Used an Anthropic API key or proxy on this computer before?
Used an Anthropic API key or proxy on this computer before?
export lines from ~/.zshrc or ~/.bashrc. On Windows, remove them under Edit the system environment variables > Environment Variables.Generate the token

claude setup-token asks you to sign in with your Claude account.
sk-ant-oat. Copy all of it. The token is valid for one year.Paste it into OneCLI
Option 2: API key from the Claude Console
Use this if you pay for API usage in the Claude Console. You don’t need a terminal.Create an API key
OneCLI, and copy the key. It starts with sk-ant-api or sk-ant-usr and is shown only once.Your Console organization needs billing set up (credits or a payment method), or requests are refused.Paste it into OneCLI
Troubleshooting
claude setup-token says a subscription is required
claude setup-token says a subscription is required
OneCLI says the value looks wrong or has spaces
OneCLI says the value looks wrong or has spaces
The key shows a warning on the Models page
The key shows a warning on the Models page
How it works
- Your credential is encrypted and stored by OneCLI (AES-256-GCM at rest)
- When an agent sends a request to
api.anthropic.com, the gateway intercepts it - The gateway injects the credential into the right header
- The request is forwarded to Anthropic