Overview
Klaus requires API keys from three providers to function:- Anthropic — Vision and reasoning via Claude
- OpenAI — Text-to-speech
- Tavily — Web search (free tier available)
~/.klaus/config.toml.
Getting Your API Keys
Anthropic (Claude)
Purpose: Vision analysis and reasoning Model used:claude-sonnet-4-6
Sign up or log in
Go to console.anthropic.com
Create an API key
- Navigate to Settings > API Keys
- Click Create Key
- Copy the key immediately (it won’t be shown again)
sk-ant-
OpenAI (Text-to-Speech)
Purpose: Convert Claude’s text responses to speech Model used:gpt-4o-mini-tts
Sign up or log in
Create an API key
- Click Create new secret key
- Give it a name (e.g., “Klaus”)
- Copy the key immediately
sk-proj- or sk-
Tavily (Web Search)
Purpose: Search the web when Klaus is uncertain about a claim Free tier: 1,000 searches per monthSign up
Go to app.tavily.com/home
tvly-
Free tier limits:The free tier includes 1,000 searches per month, which is typically sufficient for most users. Klaus only triggers search when Claude is uncertain, not on every question.
Entering Keys in Klaus
During First Run
The setup wizard (step 2) will prompt you to enter all three keys:- Launch
klaus - On the “API Keys” step, paste each key into the corresponding field
- Klaus validates the format (prefix + length) before proceeding
- Click Next to continue
After Setup
To update API keys after the initial setup:- Open Klaus
- Click the settings button (gear icon)
- Go to the API Keys tab
- Update any keys as needed
- Click Save
Key Storage
macOS (Keychain)
API keys are stored securely in Apple Keychain. Klaus resolves keys in this order:- Environment variable (
ANTHROPIC_API_KEY,OPENAI_API_KEY,TAVILY_API_KEY) - Apple Keychain
- Legacy
~/.klaus/config.tomlunder[api_keys](fallback)
config.toml, Klaus automatically migrates them to Keychain on first launch.
Windows (config.toml)
API keys are stored in~/.klaus/config.toml under the [api_keys] section:
.env files as fallbacks.
Using Environment Variables
If you prefer not to store keys in config files, set environment variables:.env file in ~/.klaus/:
.env automatically via python-dotenv.
Troubleshooting
”Invalid API key” errors
- Verify the key format matches the expected prefix
- Check for extra spaces or line breaks when pasting
- Ensure you copied the entire key
- Regenerate the key from the provider’s console
Keys not persisting
- On macOS, check Keychain Access for entries named
klaus_anthropic_key,klaus_openai_key,klaus_tavily_key - On Windows, verify
~/.klaus/config.tomlcontains the[api_keys]section - Ensure Klaus has write permissions to
~/.klaus/
Quota exceeded errors
- Check your billing dashboard at the provider’s console
- Add credits or upgrade your plan
- For Tavily, monitor your monthly search usage
Next Steps
- Camera Setup - Configure your camera hardware
- First Run - Complete the setup wizard