Setting up your Anthropic API token with Sasha
Last updated: August 2025
Time required: 15-20 minutes
Difficulty: Beginner
Overview
This guide helps you connect your own Anthropic API token to Sasha. Anthropic then bills your account directly, and you keep full control over your AI usage and costs.
What you'll achieve
- Direct billing to your Anthropic account (no markup from Sasha)
- Full control over usage limits and budget alerts
- Transparent cost tracking through your Anthropic dashboard
- The same Claude models, with more privacy
Prerequisites
Before starting, you'll need:
- Anthropic account with API access
- Active Anthropic API credits or a configured payment method
- Admin access to your Sasha instance
- Basic understanding of API tokens (we'll guide you through this)
Step-by-step setup
Step 1: create your Anthropic account and get API access
Visit Anthropic Console
https://console.anthropic.comSign up or sign in
- Create a new account or use your existing Anthropic account
- Complete email verification if required
Set up billing (required for API access)
- Go to "Billing" in the left sidebar
- Add a payment method (credit card)
- Set up usage limits and budget alerts (recommended)
- Add initial credits or set up auto-recharge
Generate API token
- Navigate to "API Keys" in the console
- Click "Create Key"
- Name:
Sasha Studio Integration - Permission:
Full Access(default) - Click "Create Key"
- Important: Copy the key immediately. You will not see it again.
Your API key will look like:
sk-ant-api03-1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
Step 2: configure Sasha
Access admin settings
- Log in to your Sasha instance
- Click the settings icon in the top right
- You should see an "Admin Settings" section (Admin Only)
Open API configuration
- Click "API Configuration"
- You'll see it currently shows "Sasha Default"
Configure your API token
- Click to open the API configuration modal
- Paste your Anthropic API token in the "Anthropic API Token" field
- Select your preferred Claude model:
- Claude 3.5 Sonnet (recommended): best balance of capability and cost
- Claude 3.5 Haiku: fastest and most cost-effective
- Claude 3 Opus: most capable (higher cost)
Test connection
- Click "Test Connection"
- Wait for validation (should take 2-3 seconds)
- You should see: "Connection successful"
Save configuration
- Click "Save Configuration"
- Confirm the change will affect all users
- Click "Yes, Continue"
Step 3: verify setup
Check configuration status
- The admin panel should now show "Your Anthropic API Active"
- You should see your token hint (e.g.,
sk-ant-api03-****cdef)
Test with a chat
- Start a new conversation
- Ask a simple question: "Hello, can you confirm you're working?"
- The response should come from Claude using your API token
Monitor usage (recommended)
- Visit your Anthropic console
- Go to "Usage" to see your API calls
- Set up budget alerts if you haven't already
Cost management
Understanding costs
Claude model pricing (as of August 2025):
| Model | Input cost | Output cost | Best for |
|---|---|---|---|
| Claude 3.5 Sonnet | $3.00/1M tokens | $15.00/1M tokens | General use, complex tasks |
| Claude 3.5 Haiku | $0.25/1M tokens | $1.25/1M tokens | Simple queries, fast responses |
| Claude 3 Opus | $15.00/1M tokens | $75.00/1M tokens | Most complex reasoning tasks |
Token usage examples
- Short question (10 words): ~15 tokens
- Document summary (1 page): ~1,000-2,000 tokens
- Code review (100 lines): ~2,000-3,000 tokens
- Long document analysis (10 pages): ~8,000-12,000 tokens
Budget recommendations
- Light usage (personal/small team): $25-50/month
- Medium usage (business team): $100-300/month
- Heavy usage (large organisation): $500+/month
Set up budget alerts at 50%, 80%, and 90% of your monthly limit.
Security best practices
API token management
Keep tokens secure
- Never share your API token with others
- Don't commit tokens to code repositories
- Use environment variables in development
Monitor usage
- Regularly check your Anthropic console for unusual activity
- Set up usage alerts and spending limits
- Review API logs for any suspicious patterns
Token rotation (recommended)
- Rotate your API token every 90 days
- Update Sasha configuration when you rotate
- Delete old tokens from Anthropic console
Access control
Admin only
- Only trusted admins should have access to API configuration
- Regular users don't see or need the API token
Audit changes
- Sasha logs all configuration changes
- Monitor who makes changes to API settings
- Keep records of token rotations
Troubleshooting
Common issues
"Invalid API token" error
- Cause: Token copied incorrectly or expired
- Solution: Generate a new token from Anthropic console
- Prevention: Copy the entire token carefully
"Model not accessible" error
- Cause: Selected model not available in your region
- Solution: Try Claude 3.5 Sonnet (most widely available)
- Check: Your Anthropic account has active credits
"Rate limit exceeded" error
- Cause: Too many API calls in a short time
- Solution: Wait a few minutes, then try again
- Prevention: Consider upgrading your Anthropic plan
No response from Claude
- Cause: Network connectivity or API service issues
- Solution: Check Anthropic status page, test connection again
- Fallback: Temporarily revert to Sasha Default API
Getting help
Check Anthropic status
- Visit: https://status.anthropic.com
- Look for any service disruptions
Review API usage
- Check your Anthropic console for error logs
- Verify you have sufficient credits
Contact support
- Anthropic API issues: support@anthropic.com
- Sasha issues: Contact your system administrator
Switching back to Sasha Default
If you need to revert to using Sasha's included API:
Open admin settings
- Go to Settings → API Configuration
Revert configuration
- Click "Revert to Sasha Default"
- Confirm the change
- Your API token remains saved but won't be used
Re-enable later
- You can switch back to your API token anytime
- No need to re-enter the token (it's securely stored)
Advanced features
Usage analytics
- Track your exact token consumption
- Compare costs before/after switching
- Optimise model selection based on usage patterns
Model selection strategy
- Use Claude 3.5 Haiku for simple queries and quick responses
- Use Claude 3.5 Sonnet for complex analysis and reasoning
- Use Claude 3 Opus only for the most demanding tasks
Bulk configuration
- Configure multiple Sasha instances with the same token
- Manage organisation-wide AI usage from one Anthropic account
- Set up department-specific budget tracking
Setup complete
You have configured your own Anthropic API token with Sasha. You now have:
- Direct cost control and transparent billing
- Full privacy with your own API relationship
- Ability to set usage limits and monitor consumption
- The same Claude capabilities, with more control
Next steps:
- Set up budget alerts in your Anthropic console
- Monitor usage patterns for the first week
- Consider optimising model selection based on your use cases
Support
- Anthropic API support: support@anthropic.com
- Sasha setup: Contact your system administrator
- Billing questions: Check your Anthropic console billing section
Last updated: August 2025 | Version: 1.0