Autentifikatsiya
OpenClaw model provayderlari uchun OAuth va API kalitlarini qo‘llab-quvvatlaydi. Anthropic hisoblari uchun API kalitdan foydalanishni tavsiya qilamiz. Claude obuna orqali kirish uchun,claude setup-token orqali yaratilgan uzoq muddatli token’dan foydalaning.
To‘liq OAuth oqimi va saqlash joylashuvi uchun /concepts/oauth ga qarang.
Tavsiya etilgan Anthropic sozlamasi (API kalit)
Agar Anthropic’dan to‘g‘ridan-to‘g‘ri foydalansangiz, API kalitdan foydalaning.- Anthropic Console’da API kalit yarating.
- Uni gateway host ga joylashtiring (
openclaw gatewayishlayotgan mashina).
- Agar Gateway systemd/launchd ostida ishlayotgan bo‘lsa, demon o‘qiy olishi uchun kalitni
~/.openclaw/.envga qo‘yish ma’qul:
openclaw onboard.
Env merosxo‘rligi (env.shellEnv, ~/.openclaw/.env, systemd/launchd) tafsilotlari uchun Help ga qarang.
Anthropic: setup-token (obuna autentifikatsiyasi)
Anthropic uchun tavsiya etilgan yo‘l — API kalit. Agar Claude obunasidan foydalansangiz, setup-token oqimi ham qo‘llab-quvvatlanadi. Uni gateway host da ishga tushiring:auth-profiles.json yoziladi + konfiguratsiya yangilanadi):
1, tugash arafasida bo‘lsa 2 chiqadi):
claude setup-token requires an interactive TTY.
Checking model auth status
Controlling which credential is used
Per-session (chat command)
Use/model <alias-or-id>@<profileId> to pin a specific provider credential for the current session (example profile ids: anthropic:default, anthropic:work).
Use /model (or /model list) for a compact picker; use /model status for the full view (candidates + next auth profile, plus provider endpoint details when configured).
Per-agent (CLI override)
Set an explicit auth profile order override for an agent (stored in that agent’sauth-profiles.json):
--agent <id> to target a specific agent; omit it to use the configured default agent.
Troubleshooting
“No credentials found”
If the Anthropic token profile is missing, runclaude setup-token on the
gateway host, then re-check:
Token expiring/expired
Runopenclaw models status to confirm which profile is expiring. If the profile
is missing, rerun claude setup-token and paste the token again.
Requirements
- Claude Max or Pro subscription (for
claude setup-token) - Claude Code CLI installed (
claudecommand available)