Migrating from Anthropic SDK
This guide will help you migrate your existing Anthropic SDK integration to use the AI Stats Gateway instead.Overview
AI Stats Gateway provides Anthropic-compatible endpoints, making migration straightforward. You’ll primarily need to:- Change the API base URL
- Update your API key
- Update authentication method
Prerequisites
- An AI Stats account and API key (get one at AI Stats Dashboard)
- Existing Anthropic SDK code
Migration Steps
1. Update API Key and Base URL
Instead of using the Anthropic API key and default base URL, use your AI Stats credentials.3. Test Your Integration
Run your existing code with the updated configuration to ensure it works.4. Handle Model Names
AI Stats supports Anthropic models. Check the models endpoint for available models. Model names should be compatible with Anthropic’s naming.Common Issues
- Model not found: Ensure the model is available in AI Stats.
- Rate limits: AI Stats may have different rate limits.
- Features: Some Anthropic-specific features may work differently.
Next Steps
- Explore AI Stats’ additional features.
- Check out the API Reference for full documentation.