ZeroClaw supports two authentication models: a traditional API key placed inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/openagen/zeroclaw/llms.txt
Use this file to discover all available pages before exploring further.
config.toml or an environment variable, and subscription-native auth profiles for providers that issue OAuth tokens (OpenAI Codex) or setup tokens (Anthropic / Claude Code). Auth profiles are stored encrypted on disk and can be scoped per provider and per account.
API key authentication
The simplest authentication method is a static API key. Set it in~/.zeroclaw/config.toml:
anthropic provider):
Auth profiles
Auth profiles let you store multiple sets of credentials for the same provider—for example, a personal and a work ChatGPT subscription—and switch between them without editingconfig.toml.
Storage
| Item | Path |
|---|---|
| Profile store | ~/.zeroclaw/auth-profiles.json |
| Encryption key | ~/.zeroclaw/.secret_key |
<provider>:<profile_name>, for example openai-codex:work or anthropic:default. The default profile name is the fallback when no --profile flag is given.
OpenAI Codex OAuth (ChatGPT subscription)
ZeroClaw supports two OAuth flows for OpenAI Codex: a device-code flow for headless/server environments and a browser/callback flow for desktop use.Device-code flow (recommended for servers)
default profile.
Browser/callback flow
Anthropic / Claude Code token auth
Claude Code uses a setup token (authorization header mode) rather than OAuth.Token interpretation mode. Use
authorization for Authorization-header tokens (Claude Code setup tokens) or api-key for standard API keys stored as a profile.Managing profiles
Check status
Refresh an access token
Switch the active profile
List all profiles
Remove a profile
Running the agent with subscription auth
Once a profile is saved, pass--provider to select the authenticated provider. ZeroClaw resolves the active profile automatically:
--auth-profile:
Auth commands summary
| Command | Description |
|---|---|
auth login | Start an OAuth flow (OpenAI Codex or Gemini) |
auth paste-redirect | Complete an OAuth flow by pasting the redirect URL or code |
auth paste-token | Store a subscription or setup token (Anthropic) |
auth setup-token | Alias for paste-token, always interactive |
auth refresh | Refresh an OAuth access token using the stored refresh token |
auth use | Set the active profile for a provider |
auth list | List all stored auth profiles |
auth status | Show active profiles and token expiry information |
auth logout | Remove a stored auth profile |