docs/reference/api-usage-costs.md
This doc lists features that can invoke API keys and where their costs show up. It focuses on OpenClaw features that can generate provider usage or paid API calls.
Per-session cost snapshot
/status shows the current session model, context usage, and last response tokens./status also shows estimated cost for the last reply./status can recover token/cache
counters and the active runtime model label from the latest transcript usage
entry. Existing nonzero live values still take precedence, and prompt-sized
transcript totals can win when stored totals are missing or smaller.Per-message cost footer
/usage full appends a usage footer to every reply, including estimated cost (API-key only)./usage tokens shows tokens only; subscription-style OAuth/token and CLI flows hide dollar cost.stats, normalizes stats.cached into cacheRead, and derives input tokens
from stats.input_tokens - stats.cached when needed.Anthropic note: Anthropic staff told us OpenClaw-style Claude CLI usage is
allowed again, so OpenClaw treats Claude CLI reuse and claude -p usage as
sanctioned for this integration unless Anthropic publishes a new policy.
Anthropic still does not expose a per-message dollar estimate that OpenClaw can
show in /usage full.
CLI usage windows (provider quotas)
openclaw status --usage and openclaw channels list show provider usage windows
(quota snapshots, not per-message costs).X% left across providers.usage_percent / usagePercent fields mean remaining
quota, so OpenClaw inverts them before display. Count-based fields still win
when present. If the provider returns model_remains, OpenClaw prefers the
chat-model entry, derives the window label from timestamps when needed, and
includes the model name in the plan label.See Token use & costs for details and examples.
OpenClaw can pick up credentials from:
auth-profiles.json).OPENAI_API_KEY, BRAVE_API_KEY, FIRECRAWL_API_KEY).models.providers.*.apiKey, plugins.entries.*.config.webSearch.apiKey,
plugins.entries.firecrawl.config.webFetch.apiKey, memorySearch.*,
talk.providers.*.apiKey).skills.entries.<name>.apiKey) which may export keys to the skill process env.Every reply or tool call uses the current model provider (OpenAI, Anthropic, etc). This is the primary source of usage and cost.
This also includes subscription-style hosted providers that still bill outside OpenClaw's local UI, such as OpenAI Codex, Alibaba Cloud Model Studio Coding Plan, MiniMax Coding Plan, Z.AI / GLM Coding Plan, and Anthropic's OpenClaw Claude-login path with Extra Usage enabled.
See Models for pricing config and Token use & costs for display.
Inbound media can be summarized/transcribed before the reply runs. This uses model/provider APIs.
See Media understanding.
Shared generation capabilities can also spend provider keys:
Image generation can infer an auth-backed provider default when
agents.defaults.imageGenerationModel is unset. Video generation currently
requires an explicit agents.defaults.videoGenerationModel such as
qwen/wan2.6-t2v.
See Image generation, Qwen Cloud, and Models.
Semantic memory search uses embedding APIs when configured for remote providers:
memorySearch.provider = "openai" → OpenAI embeddingsmemorySearch.provider = "gemini" → Gemini embeddingsmemorySearch.provider = "voyage" → Voyage embeddingsmemorySearch.provider = "mistral" → Mistral embeddingsmemorySearch.provider = "deepinfra" → DeepInfra embeddingsmemorySearch.provider = "lmstudio" → LM Studio embeddings (local/self-hosted)memorySearch.provider = "ollama" → Ollama embeddings (local/self-hosted; typically no hosted API billing)You can keep it local with memorySearch.provider = "local" (no API usage).
See Memory.
web_search may incur usage charges depending on your provider:
BRAVE_API_KEY or plugins.entries.brave.config.webSearch.apiKeyEXA_API_KEY or plugins.entries.exa.config.webSearch.apiKeyFIRECRAWL_API_KEY or plugins.entries.firecrawl.config.webSearch.apiKeyGEMINI_API_KEY or plugins.entries.google.config.webSearch.apiKeyXAI_API_KEY or plugins.entries.xai.config.webSearch.apiKeyKIMI_API_KEY, MOONSHOT_API_KEY, or plugins.entries.moonshot.config.webSearch.apiKeyMINIMAX_CODE_PLAN_KEY, MINIMAX_CODING_API_KEY, MINIMAX_API_KEY, or plugins.entries.minimax.config.webSearch.apiKeyhttps://ollama.com search uses OLLAMA_API_KEY, and auth-protected hosts can reuse normal Ollama provider bearer authPERPLEXITY_API_KEY, OPENROUTER_API_KEY, or plugins.entries.perplexity.config.webSearch.apiKeyTAVILY_API_KEY or plugins.entries.tavily.config.webSearch.apiKeySEARXNG_BASE_URL or plugins.entries.searxng.config.webSearch.baseUrl (key-free/self-hosted; no hosted API billing)Legacy tools.web.search.* provider paths still load through the temporary compatibility shim, but they are no longer the recommended config surface.
Brave Search free credit: Each Brave plan includes $5/month in renewing free credit. The Search plan costs $5 per 1,000 requests, so the credit covers 1,000 requests/month at no charge. Set your usage limit in the Brave dashboard to avoid unexpected charges.
See Web tools.
web_fetch can call Firecrawl when an API key is present:
FIRECRAWL_API_KEY or plugins.entries.firecrawl.config.webFetch.apiKeyIf Firecrawl isn’t configured, the tool falls back to direct fetch plus the bundled web-readability plugin (no paid API). Disable plugins.entries.web-readability.enabled to skip local Readability extraction.
See Web tools.
Some status commands call provider usage endpoints to display quota windows or auth health. These are typically low-volume calls but still hit provider APIs:
openclaw status --usageopenclaw models status --jsonSee Models CLI.
The compaction safeguard can summarize session history using the current model, which invokes provider APIs when it runs.
See Session management + compaction.
openclaw models scan can probe OpenRouter models and uses OPENROUTER_API_KEY when
probing is enabled.
See Models CLI.
Talk mode can invoke ElevenLabs when configured:
ELEVENLABS_API_KEY or talk.providers.elevenlabs.apiKeySee Talk mode.
Skills can store apiKey in skills.entries.<name>.apiKey. If a skill uses that key for external
APIs, it can incur costs according to the skill’s provider.
See Skills.