Hermes Agent Model Provider and API Key Setup
Hermes Agent works with any OpenAI-compatible API: run hermes model to pick a provider and set your key, or choose Custom endpoint for local models like Ollama.
Who this is for:Anyone freshly installed and stuck on which provider to pick or how to set the API key.
Steps
-
Open the provider menu
Officially supported: OpenRouter, OpenAI, Anthropic Claude, Google Gemini, and local models via Ollama/vLLM.
hermes model -
Or use the official Portal
Access 300+ models through Nous Portal.
hermes setup --portal -
Set a key directly (advanced)
hermes config set OPENROUTER_API_KEY your_key -
Local models (Ollama example)
Run hermes model, choose Custom endpoint, enter your local address, and set context length to your server's real capability.
http://localhost:11434/v1 -
Pin a specific model
hermes config set HERMES_MODEL anthropic/claude-opus-4.7
How to verify
- hermes config show displays your provider settings
- Chat replies work without API key errors
FAQ
API key set but still failing?
Official FAQ: check with hermes config show, then reconfigure via hermes model. Keys must match the provider: an OpenAI key does not work with OpenRouter.
How much does Hermes cost?
Hermes Agent itself is free and open-source (MIT). You only pay your provider's LLM API usage; community reports show provider choice can change spend by an order of magnitude.
Cheaper model for subagents?
Yes: configure the delegation block in config.yaml, e.g. model: google/gemini-3-flash-preview with provider: openrouter.
Context length exceeded?
Compress the session with /compress, check /usage, or set model.context_length explicitly in config.yaml (e.g. 131072).
Related pages
- Download and Install Hermes Agent on macOS
- Download and Install Hermes Agent on Windows (Desktop / PowerShell / WSL2)
- Download and Install Hermes Agent on Linux
- Install Hermes Agent on WSL2 (Advanced Windows Path)
- Migrate from OpenClaw to Hermes Agent (official hermes claw migrate)
- How to fix: hermes: command not found
- How to fix: API key not set / invalid API key
- How to fix: Hermes requires Python 3.11 or newer
- How to fix: context length exceeded
- Telegram + Hermes Agent: Known Pitfalls and Fixes
- Curated official issues
- School solution cards