Caricamento in corso...
Caricamento in corso...
Last synced: Today, 22:00
Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.
Use this file to discover all available pages before exploring further.
Anthropic builds the Claude model family. OpenClaw supports two auth routes:
anthropic/*For long-lived gateway hosts, Anthropic API keys are still the clearest and most predictable production path.
Anthropic's current public docs:
text<Steps> <Step title="Get your API key"> Create an API key in the [Anthropic Console](https://console.anthropic.com/). </Step> <Step title="Run onboarding"> ```bash} openclaw onboard # choose: Anthropic API key ``` Or pass the key directly: ```bash} openclaw onboard --anthropic-api-key "$ANTHROPIC_API_KEY" ``` </Step> <Step title="Verify the model is available"> ```bash} openclaw models list --provider anthropic ``` </Step> </Steps> ### Config example ```json5} { env: { ANTHROPIC_API_KEY: "sk-ant-..." }, agents: { defaults: { model: { primary: "anthropic/claude-opus-4-6" } } }, } ```
text<Steps> <Step title="Ensure Claude CLI is installed and logged in"> Verify with: ```bash} claude --version ``` </Step> <Step title="Run onboarding"> ```bash} openclaw onboard # choose: Claude CLI ``` OpenClaw detects and reuses the existing Claude CLI credentials. </Step> <Step title="Verify the model is available"> ```bash} openclaw models list --provider anthropic ``` </Step> </Steps> <Note> Setup and runtime details for the Claude CLI backend are in [CLI Backends](/gateway/cli-backends). </Note> ### Config example Prefer the canonical Anthropic model ref plus a CLI runtime override: ```json5} { agents: { defaults: { model: { primary: "anthropic/claude-opus-4-7" }, agentRuntime: { id: "claude-cli" }, }, }, } ``` Legacy `claude-cli/claude-opus-4-7` model refs still work for compatibility, but new config should keep provider/model selection as `anthropic/*` and put the execution backend in `agentRuntime.id`. <Tip> If you want the clearest billing path, use an Anthropic API key instead. OpenClaw also supports subscription-style options from [OpenAI Codex](/providers/openai), [Qwen Cloud](/providers/qwen), [MiniMax](/providers/minimax), and [Z.AI / GLM](/providers/glm). </Tip>
Claude 4.6 models default to
adaptiveOverride per-message with
/think:<level>json5{ agents: { defaults: { models: { "anthropic/claude-opus-4-6": { params: { thinking: "adaptive" }, }, }, }, }, }
OpenClaw supports Anthropic's prompt caching feature for API-key auth.
| Value | Cache duration | Description |
|---|---|---|
text "short" | 5 minutes | Applied automatically for API-key auth |
text "long" | 1 hour | Extended cache |
text "none" | No caching | Disable prompt caching |
json5{ agents: { defaults: { models: { "anthropic/claude-opus-4-6": { params: { cacheRetention: "long" }, }, }, }, }, }
© 2024 TaskFlow Mirror
Powered by TaskFlow Sync Engine