Installation
- Python
- TypeScript
Basic Usage
- Python
- TypeScript
Streaming Responses
Stream responses for real-time token delivery:- Python
- TypeScript
Token Usage Tracking
Access standard Anthropic token usage metrics in every response:- Python
- TypeScript
When compression is enabled,
input_tokens reflects the compressed token count. View detailed compression metrics in the Edgee dashboard.Compression & Tags via Headers
When using the Anthropic SDK with Edgee, you can control token compression and add tags using HTTP headers:Enabling Compression
The headers below control Token Compression.
- Python
- TypeScript
Adding Tags for Analytics
Combine compression with tags to track requests in your dashboard:- Python
- TypeScript
Multi-Provider Access
With Edgee, you can access models from multiple providers using the same Anthropic SDK client and compare costs across providers:- Python
- TypeScript
Function Calling (Tools)
Use Claude’s tool calling with Edgee:- Python
- TypeScript
Error Handling and Retries
The Anthropic SDK includes built-in retry logic, which works with Edgee’s automatic failover:- Python
- TypeScript
Complete Example
Here’s a complete application example:- Python
- TypeScript