Installation
Install the SDK via Poetry or pip:
Initialize Client
Create a client instance with your API key and project ID:
from recallrai import RecallrAI
client = RecallrAI(
api_key="rai_yourapikey",
project_id="project-uuid",
base_url="https://api.recallrai.com", # optional: custom endpoint
timeout=60, # optional: timeout in seconds (default: 60)
)
All datetime objects returned by the SDK are in UTC timezone.
Parameters
Your RecallrAI API key. Must start with rai_.
Your project UUID from the RecallrAI dashboard.
Custom API endpoint. Default: https://api.recallrai.com
Request timeout in seconds. Default: 60
Async Support
The SDK provides full async/await support for all operations. Use AsyncRecallrAI, AsyncUser, and AsyncSession for async applications:
from recallrai import AsyncRecallrAI
client = AsyncRecallrAI(
api_key="rai_yourapikey",
project_id="project-uuid"
)
# All usage patterns are identical, just with await keywords
user = await client.create_user(user_id="user123")
All async classes have the same API as their sync counterparts - just add await before method calls.
When user and session IDs are already trusted in your system, you can skip SDK lookup calls by setting validate=False on get_user() and get_session().