मुख्य सामग्री पर जाएं
Anthropic Claude मॉडल परिवार बनाता है। OpenClaw दो auth routes का समर्थन करता है:
  • API key — usage-based billing के साथ सीधे Anthropic API access (anthropic/* models)
  • Claude CLI — उसी host पर मौजूदा Claude Code login का पुनः उपयोग
OpenClaw का Claude CLI backend installed Claude Code CLI को non-interactive print mode में चलाता है। Anthropic के मौजूदा Claude Code docs claude -p को Agent SDK/programmatic usage के रूप में बताते हैं। Anthropic के 15 जून, 2026 support update ने घोषित Agent SDK billing change को रोक दिया। फिलहाल, Anthropic कहता है कि Claude Agent SDK, claude -p, और third-party app usage अभी भी subscription की usage limits से draw करते हैं। पहले घोषित monthly Agent SDK credit Anthropic द्वारा उस plan को revise करते समय उपलब्ध नहीं है।Interactive Claude Code अभी भी signed-in Claude plan limits से draw करता है। API key auth direct pay-as-you-go API billing ही रहता है। लंबे समय तक चलने वाले gateway hosts, shared automation, और predictable production spend के लिए Anthropic API key का उपयोग करें।subscription billing behavior पर निर्भर करने से पहले Anthropic के मौजूदा support articles देखें:

शुरू करना

इसके लिए सर्वोत्तम: standard API access और usage-based billing.
1

अपनी API key प्राप्त करें

Anthropic Console में API key बनाएं।
2

onboarding चलाएं

openclaw onboard
# choose: Anthropic API key
या key को सीधे pass करें:
openclaw onboard --anthropic-api-key "$ANTHROPIC_API_KEY"
3

सत्यापित करें कि model उपलब्ध है

openclaw models list --provider anthropic

Config example

{
  env: { ANTHROPIC_API_KEY: "example-anthropic-key-not-real" },
  agents: { defaults: { model: { primary: "anthropic/claude-opus-4-8" } } },
}

Thinking defaults (Claude Fable 5, 4.8, और 4.6)

anthropic/claude-fable-5 हमेशा adaptive thinking का उपयोग करता है और default रूप से high effort पर रहता है। क्योंकि Anthropic इस model के लिए thinking को disable करने की अनुमति नहीं देता, /think off और /think minimal low effort का उपयोग करते हैं। OpenClaw Fable 5 requests के लिए custom temperature values भी omit करता है। Claude Opus 4.8 OpenClaw में default रूप से thinking off रखता है। जब आप /think high|xhigh|max से adaptive thinking को स्पष्ट रूप से enable करते हैं, OpenClaw Anthropic के Opus 4.8 effort values भेजता है; Claude 4.6 models default रूप से adaptive होते हैं। Per-message override /think:<level> से करें या model params में:
{
  agents: {
    defaults: {
      models: {
        "anthropic/claude-opus-4-8": {
          params: { thinking: "high" },
        },
      },
    },
  },
}
संबंधित Anthropic docs:

Prompt caching

OpenClaw API-key auth के लिए Anthropic की prompt caching feature का समर्थन करता है।
ValueCache durationDescription
"short" (default)5 minutesAPI-key auth के लिए automatically applied
"long"1 hourExtended cache
"none"No cachingprompt caching disable करें
{
  agents: {
    defaults: {
      models: {
        "anthropic/claude-opus-4-6": {
          params: { cacheRetention: "long" },
        },
      },
    },
  },
}
model-level params को baseline के रूप में उपयोग करें, फिर specific agents को agents.list[].params के जरिए override करें:
{
  agents: {
    defaults: {
      model: { primary: "anthropic/claude-opus-4-6" },
      models: {
        "anthropic/claude-opus-4-6": {
          params: { cacheRetention: "long" },
        },
      },
    },
    list: [
      { id: "research", default: true },
      { id: "alerts", params: { cacheRetention: "none" } },
    ],
  },
}
Config merge order:
  1. agents.defaults.models["provider/model"].params
  2. agents.list[].params (matching id, key द्वारा overrides)
यह एक agent को long-lived cache रखने देता है, जबकि same model पर दूसरा agent bursty/low-reuse traffic के लिए caching disable करता है।
  • Bedrock पर Anthropic Claude models (amazon-bedrock/*anthropic.claude*) configured होने पर cacheRetention pass-through accept करते हैं।
  • Non-Anthropic Bedrock models runtime पर cacheRetention: "none" पर forced होते हैं।
  • API-key smart defaults Claude-on-Bedrock refs के लिए भी cacheRetention: "short" seed करते हैं, जब explicit value set नहीं है।

Advanced configuration

OpenClaw का shared /fast toggle direct Anthropic traffic (API-key और OAuth to api.anthropic.com) का समर्थन करता है।
CommandMaps to
/fast onservice_tier: "auto"
/fast offservice_tier: "standard_only"
{
  agents: {
    defaults: {
      models: {
        "anthropic/claude-sonnet-4-6": {
          params: { fastMode: true },
        },
      },
    },
  },
}
  • केवल direct api.anthropic.com requests के लिए injected। Proxy routes service_tier को untouched छोड़ते हैं।
  • Explicit serviceTier या service_tier params /fast को override करते हैं जब दोनों set हों।
  • Priority Tier capacity के बिना accounts पर, service_tier: "auto" standard पर resolve हो सकता है।
bundled Anthropic plugin image और PDF understanding register करता है। OpenClaw configured Anthropic auth से media capabilities को auto-resolve करता है — कोई अतिरिक्त config आवश्यक नहीं है।
PropertyValue
Default modelclaude-opus-4-8
Supported inputImages, PDF documents
जब किसी conversation में image या PDF attached होती है, OpenClaw automatically उसे Anthropic media understanding provider के माध्यम से route करता है।
Anthropic की 1M context window GA-capable Claude 4.x models पर उपलब्ध है, जैसे Opus 4.8, Opus 4.7, Opus 4.6, और Sonnet 4.6। OpenClaw उन models को automatically 1M पर size करता है:
{
  agents: {
    defaults: {
      models: {
        "anthropic/claude-opus-4-6": {},
      },
    },
  },
}
पुराने configs params.context1m: true रख सकते हैं, लेकिन OpenClaw अब retired context-1m-2025-08-07 beta header नहीं भेजता। उस value वाली पुरानी anthropicBeta config entries request header resolution के दौरान ignore की जाती हैं और unsupported पुराने Claude models अपने normal context window पर रहते हैं।params.context1m: true Claude CLI backend (claude-cli/*) पर भी eligible GA-capable Opus और Sonnet models के लिए apply होता है, जिससे उन CLI sessions के लिए runtime context window direct-API behavior से match करने के लिए preserve रहता है।
आपके Anthropic credential पर long-context access आवश्यक है। OAuth/subscription token auth अपने required Anthropic beta headers रखता है, लेकिन OpenClaw पुराने config में मौजूद होने पर retired 1M beta header को strip कर देता है।
anthropic/claude-opus-4-8 और इसके claude-cli वैरिएंट में डिफ़ॉल्ट रूप से 1M संदर्भ विंडो होती है — params.context1m: true की आवश्यकता नहीं।

समस्या निवारण

Anthropic टोकन प्रमाणीकरण समाप्त हो जाता है और निरस्त किया जा सकता है। नए सेटअप के लिए, इसके बजाय Anthropic API कुंजी का उपयोग करें।
Anthropic प्रमाणीकरण प्रति एजेंट होता है — नए एजेंट मुख्य एजेंट की कुंजियाँ इनहेरिट नहीं करते। उस एजेंट के लिए ऑनबोर्डिंग फिर से चलाएँ (या Gateway होस्ट पर API कुंजी कॉन्फ़िगर करें), फिर openclaw models status से सत्यापित करें।
कौन-सी प्रमाणीकरण प्रोफ़ाइल सक्रिय है, यह देखने के लिए openclaw models status चलाएँ। ऑनबोर्डिंग फिर से चलाएँ, या उस प्रोफ़ाइल पथ के लिए API कुंजी कॉन्फ़िगर करें।
auth.unusableProfiles के लिए openclaw models status --json देखें। Anthropic दर-सीमा कूलडाउन मॉडल-स्कोप्ड हो सकते हैं, इसलिए कोई संबद्ध Anthropic मॉडल अभी भी उपयोग योग्य हो सकता है। कोई अन्य Anthropic प्रोफ़ाइल जोड़ें या कूलडाउन की प्रतीक्षा करें।

संबंधित

मॉडल चयन

प्रदाता, मॉडल संदर्भ और फ़ेलओवर व्यवहार चुनना।

CLI बैकएंड

Claude CLI बैकएंड सेटअप और रनटाइम विवरण।

प्रॉम्प्ट कैशिंग

प्रदाताओं में प्रॉम्प्ट कैशिंग कैसे काम करती है।

OAuth और प्रमाणीकरण

प्रमाणीकरण विवरण और क्रेडेंशियल पुन: उपयोग नियम।