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 5.5 (with gpt-6.1-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-5-5 (via the Anthropic endpoint)
Node.js 24.16+ or 26.1+ (Node 26 is recommended; the official install script installs Node automatically if it is missing). If you install with npm instead, npm 11.16+ or npm 12 needs --allow-scripts=openclaw appended to the install command (npm 12 blocks package install scripts by default).
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/anthropic (without /v1)claude-opus-5-5claude-opus-5-5 the default model.cc-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-5-5",
"name": "claude-opus-5-5", "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-5-5), 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".Update:
openclaw update
# npm installs can also use: npm install -g openclaw@latest
Security audit:
openclaw security audit --deep
Edit the card in cc-switch, update the API Key and save; if you edit the config file by hand, 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
Everything below is optional; the config file is ~/.openclaw/openclaw.json, and openclaw config validate checks it after you edit.
This single line creates the Claude provider, makes it the default model and also writes the local Gateway settings such as gateway.mode (copy the whole line and replace "your-key" with your real key):
openclaw onboard --non-interactive --accept-risk --skip-health --auth-choice custom-api-key --custom-provider-id "myai168-claude" --custom-base-url "https://www.myai168.com/en/api/anthropic" --custom-model-id "claude-opus-5-5" --custom-api-key "your-key" --custom-compatibility anthropic
--accept-risk acknowledges that agents have full system access (required in non-interactive mode). Afterwards run openclaw models list and check that the model carries the default tag.
Copy the whole line (replace "your-key" with your real key); it only adds this provider and leaves everything else untouched:
openclaw config set models.providers.myai168 '{"baseUrl":"https://www.myai168.com/en/api/openai/v1","apiKey":"your-key","api":"openai-completions","models":[{"id":"gpt-6.1-sol","name":"GPT-6.1 Sol","input":["text","image"],"contextWindow":200000,"maxTokens":32000}]}' --strict-json --merge
When the primary model fails, OpenClaw tries the models in fallbacks in order. Add this under agents.defaults.model in the config file (after setting up the GPT model above):
agents: {
defaults: {
model: {
primary: "myai168-claude/claude-opus-5-5",
fallbacks: ["myai168/gpt-6.1-sol"]
}
}
}
If the Input column of openclaw models list shows only text, attached images are not passed to the model; add input: ["text", "image"] to that model's entry in the config file so it can see images.
Light jobs such as generating session titles use the main model by default. To use another configured model (a cheaper one, for example), run the command below with a "provider/model" value:
openclaw config set agents.defaults.utilityModel "myai168/gpt-6.1-sol"
If long answers get cut off, extend the wait for that provider (seconds):
openclaw config set models.providers.myai168-claude.timeoutSeconds 600
openclaw gateway install
openclaw gateway status
openclaw dashboard
gateway install installs the Gateway as a background service (on Linux it is installed as a systemd user unit); gateway status should show it listening on port 18789; openclaw dashboard opens the web UI in your browser.
To let OpenClaw use this site's AI modules as tools, see the "OpenClaw" section of the MYAI168 MCP CLI page.