Hermes
Use Router9 as a custom provider in Hermes
Hermes is an autonomous AI agent from Nous Research that lives on your server. It speaks the OpenAI API format, so you can point it at Router9 by adding a custom endpoint — no code changes required.
Setup
Hermes stores its model configuration in ~/.hermes/config.yaml. Add a custom OpenAI-compatible endpoint under the model: block:
model:
provider: custom
name: gpt-4o
base_url: https://api.router9.com/v1
api_mode: openaiWhen provider is set to custom, Hermes calls base_url directly and authenticates with OPENAI_API_KEY.
API Key
Put your Router9 key in ~/.hermes/.env:
OPENAI_API_KEY=sk-r9k-your-key-hereOr set it with the CLI, which routes the value to the right file automatically:
hermes config set OPENAI_API_KEY sk-r9k-your-key-hereChoosing Models
The name field is the model id Router9 routes on. Swap it for any model Router9 supports:
model:
provider: custom
name: claude-sonnet-4-20250514
base_url: https://api.router9.com/v1
api_mode: openaiOther ids include gpt-4o-mini and gpt-4o.
Using the Anthropic Endpoint
For Anthropic-native model access, Router9 also provides an Anthropic-compatible endpoint. Point the base_url at it and switch the request format:
model:
provider: custom
name: claude-sonnet-4-20250514
base_url: https://api.router9.com/anthropic
api_mode: anthropicSee the Anthropic API reference for details.
Tips
- Router9's flat monthly pricing pairs well with long-running agent sessions — no per-token cost surprises.
- Hermes can expose itself as an OpenAI-compatible API server, so Router9 also backs any frontend you connect to Hermes (Open WebUI, LibreChat, and others).
- Keep your key in
~/.hermes/.envrather than committing it toconfig.yaml.