Claude Code with an API key, from your phone
Claude Code's own Remote Control does not work when Claude Code signs in with an Anthropic API key. To use an API-key setup from your phone, put the key where Claude Code reads it on your Mac or Linux machine, in its settings file or a Riff project secret, then start and answer the session from Riff in your phone's browser.
By Riff · Updated · 4 min read · Facts about other products checked
Key takeaways
- Remote Control needs claude.ai. Anthropic's docs say API keys, Bedrock, Google Cloud and custom ANTHROPIC_BASE_URL setups are not supported.
- Riff runs your key. Riff starts the claude CLI on your machine, which uses the key in its own settings.
- Not your shell profile. A key exported only in ~/.zshrc or ~/.bashrc is not seen by the background runner.
- Billing stays yours. Usage is billed to that API key's Anthropic account and its rate limits apply.
Why Remote Control stops at API keys
Remote Control authenticates through a claude.ai account on an eligible plan (Pro, Max, Team or Enterprise); its docs state that API keys are not supported and that it does not work with Bedrock, Google Cloud, Foundry or a custom ANTHROPIC_BASE_URL (checked 2026-11-15). Teams that pay per token through the Anthropic Console have no phone path there.
Riff does not sit between Claude Code and Anthropic. It starts the claude CLI on your own computer, and Claude Code signs in exactly as it would in your terminal, so an API key Claude Code can find keeps working. The one catch is the environment: the runner is a background service, so it does not load your interactive shell profile.
Put the key in one of two places: Claude Code's settings file (an env entry, or an apiKeyHelper script that prints the key), which Claude Code reads wherever it starts, or a Riff project secret named ANTHROPIC_API_KEY, which Riff passes to agent processes for that project and redacts from their output. See Claude Code on your phone for the general setup.
| How Claude Code signs in | Remote Control | Riff |
|---|---|---|
| claude.ai Pro, Max, Team or Enterprise | Supported | Supported |
| Anthropic API key in Claude Code settings | Not supported | Supported |
| API key as a Riff project secret | Not applicable | Supported, redacted from agent output |
| API key exported only in the shell profile | Not supported | Not picked up: move it to settings or a project secret |
How to set it up
- Put the key where Claude Code reads it. Add ANTHROPIC_API_KEY under env in ~/.claude/settings.json, or configure apiKeyHelper there; check with claude in a new terminal.
- Or store it as a project secret. In Riff, open the project's settings and add a secret named ANTHROPIC_API_KEY. Future agent processes for that project receive it.
- Install the runner. Run curl -fsSL https://goriff.dev/install.sh | sh on that machine and approve it in your browser.
- Start Claude Code from your phone. Open Riff on your phone, pick the machine, the project and Claude Code, and start the task.
Who it is for
- You use more than one agent. Claude Code, Codex and Cursor sit in one session list so you stop jumping between separate apps to find which run is waiting.
- You step away from your desk. Check a run between meetings, answer a prompt on the train, and inspect changed files without opening a laptop.
- Your agents execute locally. Execution uses your connected machine and local tools. AI providers still receive prompts and relevant code; their policies apply.
Try Riff with your own machine
One terminal command on your Mac or Linux machine, or the Mac app. Then open Riff on your phone.
FAQ
Does Claude Code Remote Control work with an API key?
No. Anthropic's Remote Control documentation says API keys are not supported; you must sign in through claude.ai on an eligible plan. It also does not work with Bedrock, Google Cloud, Foundry or a custom ANTHROPIC_BASE_URL.
How do I use an API-key Claude Code setup from my phone?
Install the Riff runner on the Mac or Linux machine, put the key in Claude Code's settings file or in a Riff project secret named ANTHROPIC_API_KEY, then start Claude Code from Riff in your phone's browser.
Why is the key in my ~/.zshrc not used?
The Riff runner runs as a background service and does not read your interactive shell profile, so a key exported only there is not in its environment. Claude Code's settings file and Riff project secrets are read regardless of the shell.
Who pays for the tokens?
Model usage is billed to your own provider accounts. Riff does not include model usage or remove provider subscription requirements, quotas or rate limits.