Hermes, OpenClaw, and other AI agents
Hermes Agent, OpenClaw, and most third-party AI agents can connect to NordRouter as an OpenAI-compatible provider. You do not need a subscription from the agent developer: requests are charged to your NordRouter balance based on actual usage.
What you need
- an
sk-nr-…API key from the dashboard; - a Base URL ending in
/v1; - a complete Model ID from the model catalog.
Choose a Base URL
| Where the agent runs | Base URL |
|---|---|
| Russia | https://nordrouter.com/v1 |
| Outside Russia or through a VPN | https://global-api.nordrouter.com/v1 |
| European server | https://europe-api.nordrouter.com/v1 |
The examples below use the Russian endpoint. If needed, replace only the domain and keep /v1.
Hermes Agent
Hermes Agent supports custom OpenAI-compatible endpoints. Current versions store the model and endpoint in ~/.hermes/config.yaml.
Configure with the wizard
Exit any active Hermes session and run:
hermes modelChoose Custom endpoint (self-hosted / VLLM / etc.) and enter:
| Field | Value |
|---|---|
| API base URL | https://nordrouter.com/v1 |
| API key | your sk-nr-… key without any extra prefix |
| Model name | anthropic/claude-sonnet-4.6 |
| Context window | 1000000 |
Start a new Hermes session after saving. The /model command inside an open chat only switches between providers that are already configured; add a new endpoint with hermes model in a regular terminal.
Manual configuration
Open ~/.hermes/config.yaml and add or update the model block:
model:
default: anthropic/claude-sonnet-4.6
provider: custom
base_url: https://nordrouter.com/v1
api_key: sk-nr-YOUR-KEY
context_length: 1000000Do not use the old LLM_MODEL variable: modern Hermes versions use config.yaml as the source of truth. If your configuration explicitly overrides auxiliary models for vision, compression, or subagents, give those entries a compatible endpoint and a model available in NordRouter as well. With auto, they use the main model.
OpenClaw
OpenClaw adds custom providers through models.providers. Inside OpenClaw the model reference is nordrouter/anthropic/claude-sonnet-4.6, while NordRouter receives the correct public ID, anthropic/claude-sonnet-4.6.
1. Store the key separately
Create or open the global file:
- macOS / Linux:
~/.openclaw/.env; - Windows:
%USERPROFILE%\.openclaw\.env.
Add:
NORDROUTER_API_KEY=sk-nr-YOUR-KEYOpenClaw's global .env is intended for provider credentials. Do not put the key in a project-level .env or commit it to Git.
2. Add the provider
Open ~/.openclaw/openclaw.json. If it already contains channels, tools, or agents, do not replace the entire file—merge these sections into the existing object:
{
"agents": {
"defaults": {
"model": {
"primary": "nordrouter/anthropic/claude-sonnet-4.6"
}
}
},
"models": {
"mode": "merge",
"providers": {
"nordrouter": {
"baseUrl": "https://nordrouter.com/v1",
"apiKey": "${NORDROUTER_API_KEY}",
"api": "openai-completions",
"models": [
{
"id": "anthropic/claude-sonnet-4.6",
"name": "Claude Sonnet 4.6 via NordRouter",
"contextWindow": 1000000
}
]
}
}
}
}To use another model, append another object to models with its full public ID. For an image-capable model, add "input": ["text", "image"] only when Vision support is shown in the catalog.
3. Validate and select the model
openclaw config validate
openclaw models list --provider nordrouter
openclaw models set nordrouter/anthropic/claude-sonnet-4.6OpenClaw normally applies a valid configuration automatically. If the CLI says a restart is required, use the safe variant:
openclaw gateway restart --safeSend a short message in a new chat. For diagnostics, run openclaw logs --follow.
Any other AI agent
If an app offers Custom provider, OpenAI Compatible, Custom OpenAI, or Chat Completions, use:
| Field | Value |
|---|---|
| Provider | NordRouter or Custom OpenAI |
| Base URL | https://nordrouter.com/v1 |
| API Key | your complete sk-nr-… key |
| Model | for example, anthropic/claude-sonnet-4.6 |
| API format | OpenAI Chat Completions |
The app should append /chat/completions itself. Do not include that path in the Base URL.
When direct connection is impossible
If an app only supports signing in to an official OpenAI or Anthropic account and does not let you change the Base URL, it cannot connect directly to NordRouter. Do not paste your key into a field intended only for the official provider.
Supported capabilities
- regular and streaming responses;
- tool/function calling for agent actions;
- system messages and long context;
- reasoning controls on supported models;
- Vision on models marked accordingly in the catalog;
- one balance with request details in the dashboard.
A capability depends on both the model and the client. A Vision model cannot receive an image if the agent does not send images in the OpenAI-compatible format.
Safe first run
Hermes and OpenClaw can execute commands, modify files, and call external services. For the first test:
- use a test folder without secrets;
- enable approval for dangerous actions or a sandbox;
- do not grant access to a production server;
- start with a small task and inspect its cost in Activity;
- add messaging channels, browser access, and extra skills only after the base model works.
Common errors
| Error | What to check |
|---|---|
401 Invalid API key | Use the complete sk-nr-… key, without sk-nr-sk-nr- or spaces |
404 or /v1/v1/chat/completions | The Base URL must end in exactly one /v1 |
No pricing available for model | Use the full catalog ID, including the part before / |
| The model replies but tools fail | Select a modern tool-capable model and verify the client's API mode |
| The old model remains after editing config | Start a new session; in OpenClaw clear a pinned model with /model default |
503 Service Unavailable | A particular model is usually temporarily unavailable; try another one and check status |
First verify the key with the minimal request in the quickstart. If the direct request succeeds but the agent fails, its configuration is the problem.