Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sipeed/picoclaw/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Anthropic provider enables access to Claude models from Anthropic. PicoClaw uses the native Anthropic API protocol for optimal compatibility and performance.Configuration
Model List Format
Add Anthropic models to yourmodel_list configuration:
Configuration Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model_name | string | Yes | - | Alias for this model configuration |
model | string | Yes | - | Model identifier with anthropic/ prefix |
api_key | string | Yes* | - | Your Anthropic API key (or use OAuth) |
api_base | string | No | https://api.anthropic.com/v1 | API endpoint URL |
request_timeout | integer | No | 120 | Request timeout in seconds |
Available Models
Anthropic provides several Claude model families:Claude 4 Series (Latest)
anthropic/claude-opus-4- Most capable, best for complex tasksanthropic/claude-sonnet-4.6- Balanced performance and speedanthropic/claude-haiku-4- Fast and efficient
Claude 3.5 Series
anthropic/claude-opus-3.5- Previous generation flagshipanthropic/claude-sonnet-3.5- Previous generation balanced model
Claude 3 Series
anthropic/claude-opus-3- Legacy flagship modelanthropic/claude-sonnet-3- Legacy balanced modelanthropic/claude-haiku-3- Legacy fast model
Claude models support extended context windows. Opus and Sonnet models support up to 200K tokens.
Setup Instructions
1. Get API Key
- Visit Anthropic Console
- Sign in or create an account
- Navigate to API Keys section
- Click Create Key
- Copy your API key (starts with
sk-ant-)
2. Configure PicoClaw
Edit~/.picoclaw/config.json:
3. Test Connection
Advanced Configuration
Custom API Endpoint
Use a custom Anthropic-compatible endpoint:Prompt Caching
Claude supports prompt caching to reduce costs for repeated prompts. PicoClaw automatically uses cache control for system messages:- System prompts
- Tool definitions
- Large context blocks
Extended Context
Claude models support large context windows:- Opus: 200K tokens
- Sonnet: 200K tokens
- Haiku: 200K tokens
Authentication Methods
API Key (Recommended)
Standard API key authentication:OAuth / Token (Advanced)
For OAuth-based authentication:Troubleshooting
Rate Limiting
If you encounter rate limits:- Check your plan’s rate limits in the Anthropic Console
- Implement request throttling
- Upgrade your plan for higher limits
Invalid API Key
Error:401 Authentication failed
- Verify your API key is correct
- Ensure key starts with
sk-ant- - Check key hasn’t been revoked in Console
Content Filtering
Some providers (like when using Claude through proxies) have content filtering:- Rephrase your query
- Use different wording
- Contact Anthropic support if false positives occur
Timeout Errors
Increase timeout for long-running requests:Model Selection Guide
| Use Case | Recommended Model | Notes |
|---|---|---|
| Complex analysis | claude-opus-4 | Best reasoning capabilities |
| General tasks | claude-sonnet-4.6 | Best balance of speed and quality |
| Fast responses | claude-haiku-4 | Optimized for speed |
| Large documents | claude-sonnet-4.6 | 200K context window |
| Cost-sensitive | claude-haiku-4 | Most economical option |
Cost Optimization
- Choose appropriate models: Use Haiku for simple tasks, Sonnet for general use, Opus only when needed
- Enable prompt caching: Automatically enabled for system prompts (75% cost reduction)
- Set
max_tokens: Limit response length to reduce costs - Monitor usage: Check Anthropic Console regularly
- Use extended context wisely: Only include necessary context
Legacy Configuration (Deprecated)
Older configuration format (still supported):model_list format for better features like load balancing and fallbacks.