{
  "title": "Paste a setup-token during onboarding",
  "content": "openclaw onboard --auth-choice setup-token\njson5 theme={null}\n{\n  agents: { defaults: { model: { primary: \"anthropic/claude-opus-4-5\" } } },\n}\n```\n\n* Generate the setup-token with `claude setup-token` and paste it, or run `openclaw models auth setup-token` on the gateway host.\n* If you see “OAuth token refresh failed …” on a Claude subscription, re-auth with a setup-token. See [/gateway/troubleshooting#oauth-token-refresh-failed-anthropic-claude-subscription](/gateway/troubleshooting#oauth-token-refresh-failed-anthropic-claude-subscription).\n* Auth details + reuse rules are in [/concepts/oauth](/concepts/oauth).\n\n**401 errors / token suddenly invalid**\n\n* Claude subscription auth can expire or be revoked. Re-run `claude setup-token`\n  and paste it into the **gateway host**.\n* If the Claude CLI login lives on a different machine, use\n  `openclaw models auth paste-token --provider anthropic` on the gateway host.\n\n**No API key found for provider \"anthropic\"**\n\n* Auth is **per agent**. New agents don’t inherit the main agent’s keys.\n* Re-run onboarding for that agent, or paste a setup-token / API key on the\n  gateway host, then verify with `openclaw models status`.\n\n**No credentials found for profile `anthropic:default`**\n\n* Run `openclaw models status` to see which auth profile is active.\n* Re-run onboarding, or paste a setup-token / API key for that profile.\n\n**No available auth profile (all in cooldown/unavailable)**\n\n* Check `openclaw models status --json` for `auth.unusableProfiles`.\n* Add another Anthropic profile or wait for cooldown.\n\nMore: [/gateway/troubleshooting](/gateway/troubleshooting) and [/help/faq](/help/faq).",
  "code_samples": [
    {
      "code": "### Config snippet",
      "language": "unknown"
    }
  ],
  "headings": [
    {
      "level": "h3",
      "text": "Config snippet",
      "id": "config-snippet"
    },
    {
      "level": "h2",
      "text": "Notes",
      "id": "notes"
    },
    {
      "level": "h2",
      "text": "Troubleshooting",
      "id": "troubleshooting"
    }
  ],
  "url": "llms-txt#paste-a-setup-token-during-onboarding",
  "links": []
}