OpenClaw one-line setup: Claude + GPT via one API (macOS, Linux, Windows)
TL;DR: run curl -fsSL https://sh.flashapi.top/openclaw.sh | bash (macOS / Linux) or irm https://sh.flashapi.top/openclaw.ps1 | iex (Windows PowerShell), pick 3, paste your API key. Done.
One command installs OpenClaw and connects it to both Claude and GPT through Flash API. The default model is claude-opus-5-5, with gpt-6.1-sol as the fallback and reasoning effort set to medium.
1. Run the setup command
curl -fsSL https://sh.flashapi.top/openclaw.sh | bashirm https://sh.flashapi.top/openclaw.ps1 | iexThe script speaks Chinese (for now)
The script's prompts are currently in Chinese. Pick 3 for a full install, then follow the prompts.
The menu has three options:
1: Install OpenClaw only.2: Configure Flash API (Claude + GPT) only. Use this if OpenClaw is already installed, or to swap keys later.3: Install everything. Pick this on your first run.
2. Prerequisite: Node.js 24.16+
OpenClaw requires Node.js 24.16 or later (24.x) or 26.1 or later. It won't install on Node 22. The script checks your version first and tells you how to upgrade if needed (grab 24 LTS from nodejs.org, or brew install node@24). It installs with npm i -g openclaw@latest and automatically falls back to a mirror registry if that fails.
About the two keys
Claude and GPT live in different pricing groups in the dashboard, so they use separate API keys. The script first asks which model families to configure:
1: Claude + GPT (default, just press Enter)2: Claude only3: GPT only
Then it asks for, in order:
- Your Claude-group API key
- Your GPT-group API key (press Enter to reuse the Claude key)
Each key is checked against /v1/models, and the models available in that group are pulled into the config.
Error: "Requests from the ... framework are not supported"
Your Claude key belongs to a pricing group that only accepts official Claude clients. Create a new key in a group that allows third-party tools at flashapi.top, then rerun the script and pick 2 (configure).
3. Files the script writes
Just one: ~/.openclaw/openclaw.json (%USERPROFILE%\.openclaw\openclaw.json on Windows). The script writes it through OpenClaw's own openclaw config patch command, so it passes OpenClaw's schema validation.
{
models: {
mode: "merge",
providers: {
"flashapi-claude": {
baseUrl: "https://ai.flashapi.top", // Anthropic format, no /v1
api: "anthropic-messages",
apiKey: "sk-YOUR_CLAUDE_KEY",
models: [{ id: "claude-opus-5-5", contextWindow: 1000000, maxTokens: 128000 /* ... */ }]
},
"flashapi-gpt": {
baseUrl: "https://ai.flashapi.top/v1", // OpenAI format, with /v1
api: "openai-responses",
apiKey: "sk-YOUR_GPT_KEY",
models: [{ id: "gpt-6.1-sol", contextWindow: 1050000, maxTokens: 128000 /* ... */ }]
}
}
},
agents: {
defaults: {
model: { primary: "flashapi-claude/claude-opus-5-5", fallbacks: ["flashapi-gpt/gpt-6.1-sol"] },
thinkingDefault: "medium",
models: { "flashapi-claude/claude-opus-5-5": { alias: "Claude Opus 5.5" }, "flashapi-gpt/gpt-6.1-sol": { alias: "GPT-6.1 Sol" } /* ... */ }
}
}
}- Your other providers and gateway settings stay untouched. The original is backed up as
openclaw.json.bak.<timestamp>before any change. - Heads-up: OpenClaw strips comments when it rewrites the file. The backup still has them.
4. Verify and use
# Test the default model (Claude)
openclaw agent --local -m "Reply with exactly: OK"
# Test GPT
openclaw agent --local --model flashapi-gpt/gpt-6.1-sol -m "Reply with exactly: OK"- Chat in the terminal:
openclaw chat - List models:
openclaw models list - Make GPT the default:
openclaw models set flashapi-gpt/gpt-6.1-sol - Switch mid-session: type
/modelto pick a model,/thinkto change reasoning effort - Need the full kit (gateway, chat channels, control panel)? Run
openclaw onboard --install-daemonand choose Skip at the model and auth steps so your Flash API config survives. A running gateway picks up the new config automatically; no restart needed.
5. Roll back
Rename openclaw.json.bak.<timestamp> back to openclaw.json.