⌨️apiKeyHelper
Also known as apiKeyHelper setting, CLAUDE_CODE_API_KEY_HELPER_TTL_MS
A command that hands Claude Code a fresh API key.
Think of it like
It is like a key cutter by the door. It makes a fresh key when the old one stops working.
Example
Jack's company hands out keys that last one hour. His apiKeyHelper fetches a fresh one, so his sessions never stop on an old key.
Why it matters
It lets keys that change often work without you pasting a new one.
Definition
Example code
json
{
"apiKeyHelper": "~/bin/get-claude-key.sh"
}Common mistake
Key takeaways
- 1Runs your command. Output is the key.
- 2Cached five minutes. Then again.
- 3Reruns on 401. Or 403.