Client setup
OpenClaw Setup Guide
Set up OpenClaw with a script or manually, select a Claude or Codex connection, and connect it to ZhenAPI.
Connect OpenClaw to ZhenAPI. Use the interactive setup script and choose an Anthropic (Claude) or OpenAI (Codex) channel.
Anthropic(Claude)
https://api.zhenapi.ai
The Claude / Anthropic endpoint must not include /v1. Example model: claude-opus-5-5.
OpenAI(Codex)
https://api.zhenapi.ai/v1
The OpenAI / Codex endpoint must include /v1. Example model: gpt-6.1-sol.
Recommended: Interactive setup script
Choose a channel and enter your API key when prompted. The script writes the OpenClaw configuration.
BASH
1curl -fsSL https://zhenapi.ai/install/openclaw.sh | bash 💡 The script prompts for your API key. First open API Keys, create a key for the appropriate group, and paste it when prompted.
Step 1: Install OpenClaw
BASH
1npm install -g @openclaw/cliStep 2: Choose a channel
BASH
1export ANTHROPIC_API_KEY="YOUR_API_KEY"2openclaw onboard --auth-choice custom-api-key \3 --custom-base-url https://api.zhenapi.ai \4 --custom-api-key-env ANTHROPIC_API_KEY \5 --custom-compatibility anthropic \6 --custom-model claude-opus-5-5The Anthropic (Claude) channel uses the base URL without /v1.
BASH
1export OPENAI_API_KEY="YOUR_API_KEY"2openclaw onboard --auth-choice custom-api-key \3 --custom-base-url https://api.zhenapi.ai/v1 \4 --custom-api-key-env OPENAI_API_KEY \5 --custom-compatibility openai \6 --custom-model gpt-6.1-solThe OpenAI (Codex) channel uses the /v1 endpoint.
💡 First open API Keys, create an API key for the appropriate group, and replace
YOUR_API_KEY. Step 3: Start using the client
TERMINAL
1openclaw