ClaudeStore/Docs
Back to dashboard

OpenClaw Setup

Use your ClaudeStore API key with OpenClaw via a custom anthropic-messages provider in ~/.openclaw/openclaw.json. Recommended config, model IDs, verification, and troubleshooting.

Config file: ~/.openclaw/openclaw.json. Provider id: claudestore. API mode: anthropic-messages. baseUrl: https://api3.claudestore.store. Env var: CLAUDESTORE_API_KEY. Primary model: claudestore/claude-sonnet-4-6.

Why this setup

OpenClaw lets you register additional model providers via the models.providers block in its config file. For Claude models served by ClaudeStore, the cleanest integration is to add ClaudeStore as a custom anthropic-messages provider.

  • OpenClaw treats it as a first-class Anthropic-compatible provider.
  • System blocks, tool use, content blocks, and reasoning are preserved end-to-end.
  • You keep using normal OpenClaw model refs (claudestore/claude-sonnet-4-6).
OpenClaw also supports openai-completions providers, but for Claude on ClaudeStore the Anthropic Messages path is the recommended route — don't pick the OpenAI-compatible mode unless you have a specific reason.

Config path

OpenClaw reads its config from a single JSON file in your home directory:

~/.openclaw/openclaw.json

The CLI exposes openclaw config and openclaw configure helpers, but for a provider this specific it's faster and clearer to edit the JSON directly. The snippet below is drop-in.

Environment variable

Export your ClaudeStore key so the config can reference it via placeholder:

~/.zshrc or ~/.bashrcbash
export CLAUDESTORE_API_KEY="YOUR_SK_CS4_KEY"

Storing the key in an env var keeps it out of openclaw.json and out of any backups or git history of dotfiles.

Minimal working config

Drop this into ~/.openclaw/openclaw.json (the file is parsed as JSON5, so trailing commas and comments are allowed):

~/.openclaw/openclaw.jsonjson
{
  env: {
    CLAUDESTORE_API_KEY: "YOUR_SK_CS4_KEY",
  },
  agents: {
    defaults: {
      model: { primary: "claudestore/claude-sonnet-4-6" },
    },
  },
  models: {
    mode: "merge",
    providers: {
      claudestore: {
        baseUrl: "https://api3.claudestore.store",
        apiKey: "${CLAUDESTORE_API_KEY}",
        api: "anthropic-messages",
        models: [
          {
            id: "claude-sonnet-4-6",
            name: "Claude Sonnet 4.6",
            reasoning: true,
            input: ["text", "image"],
            contextWindow: 1000000,
            maxTokens: 64000,
          },
          {
            id: "claude-opus-4-7",
            name: "Claude Opus 4.7",
            reasoning: true,
            input: ["text", "image"],
            contextWindow: 1000000,
            maxTokens: 128000,
          },
          {
            id: "claude-haiku-4-5",
            name: "Claude Haiku 4.5",
            reasoning: true,
            input: ["text", "image"],
            contextWindow: 200000,
            maxTokens: 64000,
          },
        ],
      },
    },
  },
}

Stick to the recommended ids

The provider id must be claudestore and primary model must be claudestore/claude-sonnet-4-6. Don't use anthropic/... refs as the primary model in this config — those route through OpenClaw's built-in Anthropic provider, not through ClaudeStore.

Why no /v1 in baseUrl

In OpenClaw's Anthropic-compatible provider flow, baseUrl is the provider root. OpenClaw appends the Anthropic Messages path itself.

  • ✅ Correct: https://api3.claudestore.store
  • ❌ Wrong: https://api3.claudestore.store/v1

Adding /v1 here will double up the path and you'll see 404s on every request.

Verification

After saving the config, run these checks in order:

1. Provider/transport statusbash
openclaw gateway status

Confirms OpenClaw can reach the configured providers.

2. List models OpenClaw seesbash
openclaw models list

You should see claudestore/claude-sonnet-4-6, claudestore/claude-opus-4-7, and claudestore/claude-haiku-4-5 in the output.

3. Pin the primary model explicitlybash
openclaw models set claudestore/claude-sonnet-4-6
4. Open the dashboard for live callsbash
openclaw dashboard

Send a small request from the dashboard and confirm the call shows up under the claudestore provider.

Advanced: 1M context

For long-context work on Sonnet 4.6 or Opus 4.7, enable the 1M context flag per model:

agents.defaults.models[...]json
{
  agents: {
    defaults: {
      models: {
        "claudestore/claude-sonnet-4-6": { params: { context1m: true } },
        "claudestore/claude-opus-4-7":   { params: { context1m: true } },
      },
    },
  },
}

Sonnet/Opus only

Only enable context1m on supported Sonnet and Opus models. Leave Haiku at its standard context window — turning it on there will fail at the model side.

Important limitation: /fast

/fast is not 1:1 through a gateway

OpenClaw's /fast behavior was built around direct Anthropic transport. When traffic is routed through a custom gateway provider like claudestore, OpenClaw does not automatically inject Anthropic's service-tier behavior the same way. Treat /fast as a best-effort hint here, not a guaranteed transport-level contract.

Troubleshooting

404s from the provider

Almost always caused by /v1 in baseUrl. Use https://api3.claudestore.store as the bare root and let OpenClaw build the path.

Wrong provider mode

If you set api: "openai-completions", OpenClaw will try to talk OpenAI Chat Completions to an Anthropic-shaped endpoint. Switch back to api: "anthropic-messages".

Primary model not found

The primary model ref must include the provider prefix: claudestore/claude-sonnet-4-6. A bare claude-sonnet-4-6 or an anthropic/claude-sonnet-4-6 won't resolve to the ClaudeStore provider.

API key not exported

Confirm the env var is loaded in the shell that launches OpenClaw:

echo $CLAUDESTORE_API_KEY

If empty, re-export it and restart the shell. The placeholder ${CLAUDESTORE_API_KEY} in the config is resolved at process start.

OpenClaw starts but model is missing

Usually a naming mismatch: the model id inside providers.claudestore.modelsdoesn't match the ref used in agents.defaults.model.primary. The full ref is <providerId>/<modelId>.

Windows setup

1. Install OpenClaw

OpenClaw ships as a npm package and as standalone Windows binaries:

npm install -g openclaw
openclaw --version

Or grab openclaw-windows-x64.exe from GitHub Releases and put it on your PATH.

2. Config path on Windows

OpenClaw reads %USERPROFILE%\.openclaw\openclaw.json (e.g. C:\Users\<you>\.openclaw\openclaw.json):

mkdir $env:USERPROFILE\.openclaw -ErrorAction SilentlyContinue
notepad $env:USERPROFILE\.openclaw\openclaw.json

Paste the minimal config from the section above. Save as UTF-8 (no BOM).

3. Persist CLAUDESTORE_API_KEY

setx CLAUDESTORE_API_KEY "YOUR_SK_CS4_KEY"
setx only updates NEW terminals. Close the current PowerShell, open a new one, then verify with echo $env:CLAUDESTORE_API_KEY.

GUI alternative: Win+Rsysdm.cpl → Environment Variables → User variables → New.

4. Verify

openclaw gateway status
openclaw models list
openclaw models set claudestore/claude-sonnet-4-6

5. WSL

If you launch OpenClaw from inside WSL, use the Linux config path ~/.openclaw/openclaw.json and re-export the env var in ~/.bashrc:

export CLAUDESTORE_API_KEY="YOUR_SK_CS4_KEY"

6. Troubleshooting

  • "openclaw is not recognized" — open a fresh PowerShell, or add %APPDATA%\npm to PATH.
  • Placeholder ${CLAUDESTORE_API_KEY} not resolved — env var not set in the shell that launched openclaw. Use setx and reopen.
  • JSON parse error — Notepad saved with BOM. Save the file as UTF-8 without BOM (use VS Code or Notepad++).
  • PowerShell quoting — wrap all values in double quotes; cmd.exe rules differ.
  • Antivirus blocks node.exe / openclaw.exe — whitelist the binary and the host api3.claudestore.store.

Ready to start?

Get API access to all Claude models in under 2 minutes.

View Plans