A one-click setup script that configures OpenClaw to use UseModel as the LLM provider. Run one command, and you're ready to go.
🎁 Every new account gets $1 free credits — start using AI models immediately!
- ✅ Auto-detects and installs Node.js (nvm / fnm / brew)
- ✅ Register or login to UseModel account
- ✅ Auto-creates API key (valid for 1 year)
- ✅ Configures OpenClaw with UseModel provider
- ✅ Installs OpenClaw CLI if not present
- ✅ Merges with existing OpenClaw config (preserves your settings)
curl -fsSL https://use-model.com/scripts/openclaw-setup.sh | bashOr download and run manually:
git clone https://github.com/user/use-model.git
cd use-model/scripts
chmod +x openclaw-setup.sh
./openclaw-setup.shThe script walks you through the entire setup process:
- Environment Check — Verifies Node.js, curl, and API connectivity
- Login or Register — Use an existing account or create a new one (new accounts receive $1 free credits)
- API Key Creation — Automatically creates and stores an API key
- Setup Complete — Shows your API endpoint, default model, API key, balance, and next steps
| Step | Action |
|---|---|
| 1. Environment Check | Verifies curl and Node.js >= 22 are installed. Offers to install Node.js via nvm, fnm, or brew if missing. Checks UseModel API connectivity. |
| 2. Authentication | Login or register a UseModel account. New registrations include email verification and $1 bonus credits. |
| 3. API Key | Creates an API key named "OpenClaw" (valid 1 year). Reuses existing key if found in local config. |
| 4. Configure OpenClaw | Writes/merges ~/.openclaw/openclaw.json with UseModel provider settings. Backs up existing config if needed. |
| 5. Summary | Installs OpenClaw CLI if needed, sets gateway mode to local, and shows next steps. |
After setup, your ~/.openclaw/openclaw.json will include:
{
"models": {
"mode": "merge",
"providers": {
"usemodel": {
"baseUrl": "https://api.use-model.com/v1",
"apiKey": "sk-...",
"api": "openai-completions",
"models": [
{
"id": "minimax-m2.5",
"name": "MiniMax M2.5",
"contextWindow": 128000,
"maxTokens": 32000
}
]
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "usemodel/minimax-m2.5"
}
}
}
}| Variable | Default | Description |
|---|---|---|
USEMODEL_API_BASE |
https://api.use-model.com |
UseModel API base URL |
- curl — for API requests
- Node.js >= 22 — required by OpenClaw (script can install it for you)
- jq (optional) — for merging with existing config
# Start the gateway
openclaw gatewaycurl https://api.use-model.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"minimax-m2.5","messages":[{"role":"user","content":"hello"}]}'| Issue | Solution |
|---|---|
Cannot reach UseModel API |
Check your network connection. Try setting USEMODEL_API_BASE if using a custom endpoint. |
| Node.js install needs restart | Run source ~/.bashrc or source ~/.zshrc, then re-run the script. |
| Permission denied on npm install | The script will auto-retry with sudo. |
| Config merge failed | Install jq for proper config merging: brew install jq or apt install jq. |
MIT
🦞 Powered by UseModel
