Repository navigation
Release v2.2.1
AI Spine SDK v2.2.1
Breaking Changes
- API key is now required (no default value)
- API key must start with 'sk_' prefix
- New exception: InsufficientCreditsError for credit management
New Features
- Added
get_current_user()method to get user info and credits - Added
check_credits()method to check remaining credits - Better error handling for 401, 403, and 429 status codes
- Support for custom base_url with trailing slash handling
Installation
pip install ai-spine-sdk==2.2.1Quick Start
from ai_spine import Client
# Initialize with your API key
client = Client(api_key="sk_your_api_key_here")
# Check your credits
credits = client.check_credits()
print(f"Remaining credits: {credits}")
# Execute a flow
result = client.execute_flow("flow_id", {"data": "value"})Full Changelog: https://github.com/Dataframe-Consulting/ai-spine-sdk-python/commits/v2.2.1