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:

  1. Anthropic account with API access
  2. Active Anthropic API credits or a configured payment method
  3. Admin access to your Sasha instance
  4. 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

  1. Visit Anthropic Console

    https://console.anthropic.com
    
  2. Sign up or sign in

    • Create a new account or use your existing Anthropic account
    • Complete email verification if required
  3. 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
  4. 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

  1. 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)
  2. Open API configuration

    • Click "API Configuration"
    • You'll see it currently shows "Sasha Default"
  3. 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)
  4. Test connection

    • Click "Test Connection"
    • Wait for validation (should take 2-3 seconds)
    • You should see: "Connection successful"
  5. Save configuration

    • Click "Save Configuration"
    • Confirm the change will affect all users
    • Click "Yes, Continue"

Step 3: verify setup

  1. 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)
  2. 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
  3. 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

  1. Keep tokens secure

    • Never share your API token with others
    • Don't commit tokens to code repositories
    • Use environment variables in development
  2. Monitor usage

    • Regularly check your Anthropic console for unusual activity
    • Set up usage alerts and spending limits
    • Review API logs for any suspicious patterns
  3. Token rotation (recommended)

    • Rotate your API token every 90 days
    • Update Sasha configuration when you rotate
    • Delete old tokens from Anthropic console

Access control

  1. Admin only

    • Only trusted admins should have access to API configuration
    • Regular users don't see or need the API token
  2. 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

  1. Check Anthropic status

  2. Review API usage

    • Check your Anthropic console for error logs
    • Verify you have sufficient credits
  3. Contact support


Switching back to Sasha Default

If you need to revert to using Sasha's included API:

  1. Open admin settings

    • Go to Settings → API Configuration
  2. Revert configuration

    • Click "Revert to Sasha Default"
    • Confirm the change
    • Your API token remains saved but won't be used
  3. 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

made with bernard

Cookie settings