Goal of this guide: install OpenClaw (an open-source AI agent that runs on your own machine, nicknamed the "lobster" π¦) on a Linux desktop and connect it to your own MYAI168 API, using Claude Opus 4.8 (with gpt-5.6-sol as an optional backup).
On Linux desktop, configuring the lobster with the cc-switch GUI has been verified to work (settings are written successfully). (Prerequisite: cc-switch is installed β for installation, see the "cc-switch Linux" page in the Developer Center.)
Anthropic native endpoint https://www.myai168.com/en/api/anthropic
OpenAI-compatible endpoint https://www.myai168.com/en/api/openai/v1
Main model claude-opus-4-8 (via the Anthropic endpoint)
Node.js 22.22.3+, 24.15+, or 25.9+ (Node 24 is the official default target and the recommended choice).
Check Node:
node --version
If missing, install (Ubuntu / Debian):
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
If it conflicts with the distro's old built-in Node (libnode-dev), remove that first and install again:
sudo apt-get remove -y libnode-dev
sudo apt-get install -y nodejs
Check your shell:
echo $SHELL
Ends with /bash β use ~/.bashrc; ends with /zsh β use ~/.zshrc.
npm install -g openclaw@latest
Verify:
openclaw --version
If command not found, add the npm global bin directory to PATH:
echo 'export PATH="$PATH:'$(npm config get prefix)'/bin"' >> ~/.bashrc
source ~/.bashrc
myai168-claude (lowercase, hyphen)MYAI168 Claudehttps://www.myai168.com/en/api/anthropicclaude-opus-4-8cc-switch writes the settings into models.providers of ~/.openclaw/openclaw.json, looking roughly like this (for reference β usually no manual editing needed):
"models": {
"mode": "merge",
"providers": {
"myai168-claude": {
"baseUrl": "https://www.myai168.com/en/api/anthropic",
"apiKey": "your-key",
"api": "anthropic-messages",
"models": [ { "id": "claude-opus-4-8",
"name": "claude-opus-4-8", "input": ["text"] } ]
}
}
}
(Note: the anthropic baseUrl is .../anthropic, without /v1 β OpenClaw's Anthropic client appends /v1 automatically; verified to work.)
Confirm it was written:
cat ~/.openclaw/openclaw.json
openclaw doctor
doctor asks a few setup questions; recommended answers:
Confirm the models were loaded:
openclaw models list
You should see your models, with yes in the Auth column and the main model tagged default / configured. (If a claude-cli/... entry also appears, it was auto-detected from a local Claude CLI install β ignore it.)
Launch test:
openclaw
Once in the chat UI (if the built-in OpenClaw setup agent β formerly called Crestodian β appears first, it hands you over to the main agent; the status bar at the bottom should show myai168-claude/claude-opus-4-8), ask a math question:
What is 123456 times 789? Reply with the number only.
If it answers 97406784, the connection works. (Do not verify with "who are you" β model self-identification is unreliable.)
You can also try chatting in the dashboard (it needs the Gateway running; on a fresh install start it first):
openclaw gateway start
openclaw gateway status # Runtime: running means it is up
openclaw dashboard # opens http://127.0.0.1:18789/ in the browser
source ~/.bashrc (for zsh: source ~/.zshrc) or reopen the terminal; if still not found, see the PATH fix in "1. Install OpenClaw". (On macOS: source ~/.zshrc.)Update:
openclaw update
# or: npm update -g openclaw
Security audit:
openclaw security audit --deep
Update the API Key on the cc-switch card and Enable it again. (For manual setups on macOS: update the apiKey in ~/.openclaw/openclaw.json and restart.)
~/.openclaw/openclaw.json (the same directory also holds state/, logs/, etc.)
Official docs: https://docs.openclaw.ai