Command-line agents
OpenClaw
Add NoviaHub to OpenClaw as a custom model provider.
OpenClaw is an open source AI assistant that runs on your own computer and connects to the chat apps you already use. Models are called by its Gateway, a service that runs in the background. Add a custom provider to its config file and it can use models on NoviaHub.
Prerequisites
Section titled “Prerequisites”- A NoviaHub API key. If you don’t have one yet, see API keys.
- Funds in your account. Calls are charged to your balance by usage.
Install
Section titled “Install”OpenClaw runs on macOS, Linux and Windows and needs Node.js 24.16+ or 26.1+. The installer script is the recommended route: it detects your system, installs Node.js if it’s missing, installs OpenClaw and starts onboarding. Use any of the official methods:
curl -fsSL https://openclaw.ai/install.sh | bashiwr -useb https://openclaw.ai/install.ps1 | iexnpm install -g openclaw@latest --allow-scripts=openclawopenclaw onboard --install-daemonInstalling with npm requires Node.js to be installed first. On npm 11.15 and earlier, leave out --allow-scripts=openclaw.
OpenClaw also offers a Windows Hub app and a macOS .dmg.
Configure NoviaHub
Section titled “Configure NoviaHub”-
Put the API key in
~/.openclaw/.env. The Gateway only sees the environment of its own process. When it runs as a background service (launchd on macOS, systemd on Linux and so on), variables youexportin a terminal may not reach it. OpenClaw recommends keeping provider API keys in the global~/.openclaw/.envfile. Open (or create) that file and add one line:~/.openclaw/.env NOVIAHUB_API_KEY=sk-...The file holds your key. OpenClaw’s security guidance is to keep files under
~/.openclawat600(read/write for you only), so run:终端窗口 chmod 600 ~/.openclaw/.env -
Edit the config file
~/.openclaw/openclaw.jsonand add the NoviaHub provider (if the file already has settings, mergemodels.providers.noviahubandagents.defaults.modelinto them):~/.openclaw/openclaw.json {"models": {"providers": {"noviahub": {"baseUrl": "https://noviahub.com/v1","apiKey": "${NOVIAHUB_API_KEY}","api": "openai-completions","models": [{"id": "deepseek-v4-flash","name": "deepseek-v4-flash","contextWindow": 1000000}]}}},"agents": {"defaults": {"model": { "primary": "noviahub/deepseek-v4-flash" }}}}What each field means:
Field Meaning noviahubThe provider ID. You refer to models as noviahub/<model ID>.baseUrlWith openai-completionsoropenai-responses, include/v1:https://noviahub.com/v1.apiKey${NOVIAHUB_API_KEY}reads an environment variable. Only upper-case names are substituted: upper-case letters, digits and underscores, not starting with a digit.apiThe request protocol. openai-completionsis the Chat API, and also the default whenapiis left out.models[].idThe model ID on NoviaHub. It must match exactly. models[].contextWindowThe context window. Without it, OpenClaw budgets for 200,000 tokens. The example value is the Context shown on Models & Pricing on 2026-09-28; the page is authoritative. -
Restart the Gateway so it picks up the new key:
终端窗口 openclaw gateway restartLater changes to
openclaw.jsondon’t need a restart; the Gateway watches the file and applies them.
Verify
Section titled “Verify”# List the models under the noviahub provideropenclaw models list --provider noviahub
# Ask one question with the model, without opening the chat interfaceopenclaw infer model run --model noviahub/deepseek-v4-flash --prompt "Introduce yourself in one sentence."According to the docs, models written out under models.providers.<provider ID>.models appear in openclaw models list, so the first command should list noviahub/deepseek-v4-flash. The second reads the model and key from your config, sends one request and prints the reply. If you get a reply and the call shows up under Usage Logs in NoviaHub, the setup works. Then run openclaw tui to open the chat interface.
Switch models
Section titled “Switch models”- In a chat, type
/modelto switch. - From the command line:
openclaw models set noviahub/<model ID>. - Change
agents.defaults.model.primaryin the config to set the default.
Add a model to the models list before using it. Match the protocol to the model: openai-completions needs the Chat endpoint label, openai-responses needs Response and anthropic-messages needs Anthropic. The labels are on each model’s page under Models & Pricing.
To call Claude models over the Anthropic protocol, add a second provider with api set to anthropic-messages and baseUrl set to https://noviahub.com (without /v1).
- OpenClaw validates its config strictly: if it finds a key it doesn’t know, the Gateway refuses to start. If it fails to start after an edit, check your spelling first.
- Without
contextWindow, OpenClaw assumes 200,000 tokens. Many NoviaHub models have larger contexts, so fill in the real value.
References
Section titled “References”Checked on 2026-09-28 and 2026-09-29:
- About OpenClaw: docs.openclaw.ai
- Install: docs.openclaw.ai/install
- Custom providers: docs.openclaw.ai/gateway/config-tools/custom-providers
- Provider examples: docs.openclaw.ai/gateway/config-tools/provider-examples
- Environment variables: docs.openclaw.ai/gateway/configuration/environment-variables, docs.openclaw.ai/help/environment
- Config validation and hot reload: docs.openclaw.ai/gateway/configuration
- Restarting the Gateway: docs.openclaw.ai/cli/gateway/restart-and-supervision
- Model commands: docs.openclaw.ai/cli/models
- One-off calls (
openclaw infer model run): docs.openclaw.ai/cli/infer - Terminal chat interface (
openclaw tui): docs.openclaw.ai/cli/tui - File permission guidance: docs.openclaw.ai/gateway/security/secrets-and-storage