Manual setup · Windows, macOS and Linux
Hermes Agent + Space Router
Hermes Agent is an open-source agent from Nous Research that runs as a persistent background process and accepts any custom model endpoint. Pointing it at Space Router takes five configuration commands.
There is no one-command installer for Hermes. Install Hermes first by following its own documentation and confirm that hermes runs in your terminal, then come back here.
Before you start
You need one Space Router API key. Its group decides both the models you can call and which of the two routes you configure. Create the key in the Space Router dashboard under API Keys → Create API Key, choosing the matching group.
| Key group | Route | Model slugs |
|---|---|---|
| Claude (group 3) | Anthropic Messages | claude-opus-5, claude-sonnet-5, claude-opus-4-8, claude-opus-4-7, claude-opus-4-6, claude-sonnet-4-6 |
| Claude Fable 5 (group 5) | Anthropic Messages | claude-fable-5 |
| GPT (group 4) | OpenAI-compatible | gpt-6-astra, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5, gpt-5.4, gpt-5.4-mini |
A key only works inside its own group. A Claude key asking for gpt-5.5, or a Claude key asking for claude-fable-5, gets a hard error rather than a fallback — Fable is a separate purchase. The live catalogue is published at /models.json.
Step 1 · Find the config file
-
Print the path
Open a terminal and run this. It tells you exactly which file the next step will write, which is worth knowing before you change anything.
hermes config path -
Compare it with the default
macOS and Linux
~/.hermes/config.yamlWindows
%LOCALAPPDATA%\hermes\config.yamlIf the printed path is somewhere else, Hermes is using a non-default config — everything below still applies, it just lands in that file instead.
-
Back it up if it already has settings
The commands in step 2 overwrite the
model.keys only, but a copy costs nothing.cp ~/.hermes/config.yaml ~/.hermes/config.yaml.bak
Step 2 · Set the custom provider
Run the block for your key group. Each line is a separate command; run them in order.
Claude or Fable key — the Anthropic Messages route
-
Run the five commands
hermes config set model.provider custom hermes config set model.base_url https://space.stationine.com hermes config set model.api_mode anthropic_messages hermes config set model.api_key sk-your-space-router-key hermes config set model.default claude-sonnet-5 -
Note the base URL has no suffix
anthropic_messagesmode appends/v1/messagesitself, so the value stops at the gateway root. Adding/v1here produces a404that looks like a wrong key.
GPT key — the OpenAI-compatible route
-
Run the four commands
hermes config set model.provider custom hermes config set model.base_url https://space.stationine.com/v1 hermes config set model.api_key sk-your-space-router-key hermes config set model.default gpt-5.6-sol -
Do not set
model.api_modeat allThe OpenAI route is the absence of that setting. Here the base URL does end at
/v1, because Hermes appends/chat/completionsitself.
Step 3 · Check what was written
Open the file from step 1. The commands produce this block, and you can edit it directly instead of re-running them.
model:
provider: custom
base_url: https://space.stationine.com
api_mode: anthropic_messages
api_key: sk-your-space-router-key
default: claude-sonnet-5
Two things to confirm: the four or five keys are all present, and there is no leftover setting from a previous provider sitting under model:.
.env file for the key. Hermes also reads credentials from its .env. Keeping the key there rather than in config.yaml is the safer habit — configuration files are the ones that get pasted into a bug report or committed by accident.
Step 4 · Verify
-
Start Hermes
If it was already running as a background process, restart it so it reloads the configuration.
-
Send one short message
Send
Reply with OK. A reply proves the base URL, the key, the route and the model slug are all correct together. Reading the config file back proves none of those — only a real request does.
Switching routes later
Moving from the Anthropic route to the OpenAI route is not just a base-URL change: you must also clear model.api_mode. A leftover anthropic_messages against a /v1 base URL is the single most confusing failure on this page, because the key and the model are both fine and the error is a bare 404.
Troubleshooting
| What you see | What it means |
|---|---|
401 or 403 |
The key is wrong, revoked, or out of balance. Re-copy it from the dashboard and check for a leading or trailing space. |
404 |
The base URL and the route disagree — /v1 with api_mode: anthropic_messages, or the bare root without it. Can also be a misspelled model slug. |
| The model is rejected as unsupported | The slug belongs to a group your key does not have. Compare it against the table above. |
| It fails on the very first tool call | The selected model does not support function calling, which Hermes requires on every request. |
| The change had no effect | The background process was not restarted, or hermes config path points somewhere other than the file you edited. |
What is Space Router?
Space Router is an AI API relay operated by Station Nine. Its base URL is https://space.stationine.com. It accepts Anthropic Messages requests at POST /v1/messages, OpenAI Chat Completions requests at POST /v1/chat/completions, and OpenAI Responses requests at POST /v1/responses, and it provides OpenAI GPT and Anthropic Claude model families. See the full Space Router overview for service and account details.
Need credentials? Get your API key from Space Router.