Anthropic Rust SDK
An unofficial Rust SDK for the Anthropic API.
Features
- Full async/await support
- Comprehensive error handling
- Pagination support
- Token counting utilities
Installation
Quick Start
use AnthropicClient;
use ;
async
Examples
Check out the examples directory for more usage examples:
- List Models - How to list available models
- Message - How to create a message
- Count Message Tokens - How to count tokens in a message
API Coverage
- List Models
- Create Message
- Count Message Tokens
- Stream Message
- Upload Files
- Delete Files
Development
Prerequisites
- Rust 1.81 or later
- An Anthropic API key
Running Tests
Running Examples
Set your API key
Run an example
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Security
If you discover a security vulnerability within this package, please send an e-mail to the maintainers. All security vulnerabilities will be promptly addressed.
Support
For support questions, please use the GitHub Issues.