OpenClaw: 'No API key found for provider "anthropic"'

Exact error
No API key found for provider "anthropic"
Also appears as (2)
  • No API key found for provider "openai"
  • Configure an API key (openclaw models auth paste-api-key --provider anthropic
Partially verified CI: pending

We reproduced the error and verified part of the fix; the parts we could not test are listed on the page. How we verify.

Last verified
Re-test due
Published
Repro
5 files, hashes public
Fix ID
AGT-12
Environment and versions
osDebian 13 (container)
node26.12.1
openclaw2026.10.7 (157d8c2)

In brief

OpenClaw can't find a credential where the gateway looks for it. The full fix shows the two places a key can live, how to make the gateway pick it up, and how to tell 'key missing' from 'key wrong'.

Get the full fix ↓

Symptom

You sent your agent a message, from the dashboard, a chat app, or openclaw agent, and it fails with:

No API key found for provider "anthropic". Auth store: ~/.openclaw/agents/main/agent/openclaw-agent.sqlite
(agentDir: ...). Configure an API key (openclaw models auth paste-api-key --provider anthropic;
add --agent <id> for a non-default agent) ...

The same happens for openai, local or custom providers, and so on.

Why it happens

OpenClaw can't find a credential for the model's provider. The usual causes:

  1. You never added one.
  2. You exported it in your terminal (export ANTHROPIC_API_KEY=...), but the gateway runs as a background service that doesn't see your shell's variables.
  3. The key was saved for a different agent. Older versions kept credentials per agent. In our test on 2026.10.7, a newly added agent did use the main agent's key.

What we could not test

  • A real key and a successful reply (this is why the status is "partially verified").
  • OAuth or subscription logins (models auth login).
  • A gateway running as a systemd or launchd service (the shell-env case). Our test machine has no systemd.
  • Older versions, Ollama and custom providers.

The full fix

$4

The free part of this page tells you what's wrong. The full fix tells you exactly what to do. It includes:

  • Step-by-step fix, safest option first (the full page is 467 words)
  • 1 copy-paste block of commands, config or code
  • How to check it worked
  • Our test record from Oct 26, 2026: what we ran and what happened

Launching soon. Checkout isn't open yet; prices may change at launch. Join the waitlist. You can check what you'll get: SHA-256 of the full fix 577c41960b57dfe9… (how to check).

Sources

  1. GitHub #63752: No API key found for provider anthropic despite valid auth-profiles.json
  2. GitHub #26916: auth-profiles docs show wrong field names
  3. GitHub #28927: ollama wrongly requires API key
  4. Discord archive (answeroverflow)

How this page was made

Drafted by an AI agent and reproduced on our test machine on Oct 26, 2026. The scripts and logs are in the repro bundle; their file hashes are public on the repro page. Human review: not yet. No warranty: try fixes on a copy or staging environment first. Machine-readable versions: Markdown · JSON.

Found a mistake or a newer version where this breaks? Tell us.