OpenClaw is a self-hosted AI assistant that connects chat apps (WhatsApp, Telegram, Discord, and more) to LLM providers. Because Nebius Token Factory serves open models through an OpenAI-compatible API, you can point OpenClaw at Token Factory and run your agents on models like Qwen3, Llama, and DeepSeek.
Why Token Factory?
- OpenAI-compatible: no special SDK; OpenClaw’s built-in OpenAI provider works as-is.
- Open models: Qwen3, Kimi, DeepSeek, GLM and more, all behind one API key.
- Cost control: usage-based pricing with no infrastructure to manage.
Prerequisites
- A running OpenClaw instance, or a Mac with Homebrew for the optional installation step below.
- A Nebius Token Factory API key. See Getting Started for how to create one.
Optional: Install OpenClaw on macOS
Skip this section if openclaw --version already works.
brew install -y openclaw-cli
openclaw --version
1. Get your API key
Grab a key from tokenfactory.nebius.com.
2. Add Token Factory as a provider
openclaw configure --section model
- Choose Custom provider.
- Base URL =
https://api.tokenfactory.nebius.com/v1 - API key = paste your Nebius API key when prompted
- Select OpenAI-compatible.
- Model ID =
moonshotai/Kimi-K2.6 - Provider ID =
nebius-token-factory - Model alias = leave blank
Model Selection
Model IDs use the case-sensitive org/model form. This tutorial uses:
| Model | ID |
|---|---|
| Kimi-K2.6 | moonshotai/Kimi-K2.6 |
Copy other current model IDs from the Token Factory catalog.
That’s it!
Optional: Protect your API key with OpenClaw Secrets
API keys grant access to your account, so avoid leaving them as plaintext in shared configuration files. OpenClaw supports SecretRefs that resolve credentials from environment, file, command, and secret-store providers. See OpenClaw Secrets Management for setup and migration instructions.
3. Restart OpenClaw
For a fresh CLI installation, generate a local Gateway token and save the local authentication settings once:
export OPENCLAW_GATEWAY_TOKEN="$(openssl rand -hex 32)"
openclaw config set gateway.mode local
openclaw config set gateway.auth.mode token
openclaw config set gateway.auth.token "$OPENCLAW_GATEWAY_TOKEN"
The token authenticates local clients such as the dashboard and TUI. Keep it private.
Be sure to restart the OpenClaw Gateway for changes to take effect:
openclaw gateway restart
If the Gateway service is not installed, run it in the foreground instead:
openclaw gateway run
Then launch the web-based UI:
openclaw dashboard
Or launch the terminal-based UI:
openclaw tui
Troubleshooting
- 401 or 403: check that the saved Nebius API key is correct and can access the model.
- 404 / model not found: verify the model ID (
org/model, case-sensitive) against the live catalog. - Wrong endpoint: the base URL must end in
/v1; do not append/chat/completionsyourself. openclaw: command not foundafter installation: open a new terminal window and runopenclaw --versionagain.