Getting an API Key
To use the SDK, you need an API key from your Elephantasm dashboard:
- Sign up or log in to your account
- Navigate to Settings → API Keys
- Click Create API Key
- Copy your key (it starts with
sk_live_) - Set it as
ELEPHANTASM_API_KEYin your environment
Your API key grants full access to your animas and events. Never commit it to source control or expose it in client-side code.
Environment Variables
export ELEPHANTASM_API_KEY=sk_live_...
export ELEPHANTASM_ANIMA_ID=your-anima-id # optional defaultThe module-level functions (inject, extract) read these automatically. When using the explicit client, pass them as constructor arguments instead.
Explicit Credentials
from elephantasm import Elephantasm
client = Elephantasm(
api_key="sk_live_...",
anima_id="your-anima-id", # optional default
endpoint="https://api.elephantasm.com" # optional
)Key Rotation
You can create multiple API keys and revoke old ones from the dashboard. Keys are scoped to your organization — all animas within your org are accessible with any valid key.
Next Steps
- Quick Start — Start capturing events
- Environment Variables — Full configuration reference