Use the subscription you already pay for — Claude Pro, Qwen CLI, etc. — to power your Agent without a separate API key.Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
Quick Start
How It Works
Subscription Auth enables agents to use your existing subscriptions without requiring separate API keys.Supported Providers
Which subscription auth provider should you use?auth= value | Subscription | Token source | Status |
|---|---|---|---|
claude-code | Claude Pro | ~/.claude/.credentials.json or macOS Keychain | ✅ Working |
qwen-cli | Qwen | ~/.qwen/oauth_creds.json | ✅ Working |
codex | ChatGPT Plus | ~/.codex/auth.json | ⚠️ Experimental |
gemini-cli | Gemini | ~/.gemini/oauth_creds.json | ⚠️ Experimental |
Common Patterns
Telegram bot using your Claude subscription
Switching between API key and subscription
Custom provider (advanced)
Configuration Options
SubscriptionCredentials API Reference
Configuration options and types for subscription credentials
Best Practices
Token Security
Token Security
Tokens are read locally from your CLI tools and never persisted by PraisonAI. They stay in memory only during agent execution and are automatically refreshed when needed.
Backward Compatibility
Backward Compatibility
Existing agents using API keys continue to work unchanged. Setting
auth= is completely optional and doesn’t affect agents that don’t use it.Auto-Refresh Behavior
Auto-Refresh Behavior
Claude Pro tokens are automatically refreshed when they expire within 60 seconds. The refresh happens transparently without user intervention using stored refresh tokens.
Don't commit token files
Don't commit token files
Never commit
~/.claude/.credentials.json, ~/.qwen/oauth_creds.json, or similar files to version control. These contain sensitive authentication data.Troubleshooting
”No Claude Code credentials found”
Solution: Install Claude Code CLI and runclaude /login to authenticate with your Claude Pro account.
macOS Keychain prompt every run
Solution: Grantsecurity command access to avoid repeated prompts. This is handled automatically by the system after first access.
Anthropic 500 errors
Issue: OAuth tokens require specific headers that are automatically included. What PraisonAI does: Automatically sends required headers:user-agent: claude-cli/<version> (external, cli)x-app: clianthropic-beta: interleaved-thinking-2025-05-14,fine-grained-tool-streaming-2025-05-14,context-1m-2025-08-07,claude-code-20250219
Codex / Gemini raise AuthError
Expected behavior: These providers are experimental and not yet usable. They’re registered for future use but currently raise AuthError with messages about needing custom transports.
Token Detection Priority (Claude Pro)
Tokens are resolved in this exact order:ANTHROPIC_TOKENenvironment variableCLAUDE_CODE_OAUTH_TOKENenvironment variable- macOS Keychain (
Claude Code-credentials) ~/.claude/.credentials.jsonfile
Environment Variable Override
You can disable subscription auth entirely (planned):Related
Agents
Learn about agent configuration and setup
LLM Providers
Configure different LLM providers and endpoints

