Anthropic Python SDK
Prerequisites
- Python 3.8+
- A Chuizi.AI account with an API key (starts with
ck-)
Installation
terminal
bash
pip install anthropic
Basic Usage
example.py
python
from anthropic import Anthropic client = Anthropic( base_url="https://api.chuizi.ai/anthropic", api_key="ck-your-key-here", ) message = client.messages.create( model="claude-sonnet-4-6", max_tokens=1024, messages=[ {"role": "user", "content": "Hello!"} ], ) print(message.content[0].text)
Next Steps
- Prompt Caching — save up to 90% on repeated system prompts
- Streaming Guide — Anthropic protocol streaming details
- Migration Guide — migrate from Anthropic direct