Overview
Satori uses API keys for authentication, powered by Clerk’s API key management system. Each API key is tied to a specific tenant (you, the developer), and all memories stored using that key are isolated to your account.API Key Structure
Satori API keys follow this format:Creating an API Key
Sign in to your dashboard
Visit satori.dev/dashboard and sign in with your account.
Using API Keys
Server-Side Usage (Recommended)
Always use API keys on the server side, never in client-side code:app/api/chat/route.ts
Client-Side (Never Do This)
Authentication Headers
When making direct HTTP requests to the Satori API, include your API key in thex-api-key header:
Tenant Isolation Model
Satori uses a two-level isolation model:Level 1: Tenant (API Key Owner)
Your API key identifies you as the tenant. All memories created with your key belong to your account.Level 2: End Users (Your Application’s Users)
Within your tenant, you can have unlimited end users, each with isolated memories:Think of it like this: Your API key is your “account”, and
userId is how you separate your users’ data within your account.API Key Verification Flow
Here’s what happens when you make a request:Managing API Keys
List Your Keys
View all your active API keys:Revoke a Key
Revoke an API key to immediately prevent all access:Security Best Practices
Use environment variables
Use environment variables
Store API keys in environment variables, never hardcode them:
Rotate keys regularly
Rotate keys regularly
Create a new API key and update your applications, then revoke the old key:
- Create new key in dashboard
- Update environment variables in all environments
- Deploy updates
- Revoke old key
Use different keys per environment
Use different keys per environment
Separate keys for development, staging, and production:
Monitor key usage
Monitor key usage
Check the “Last used” timestamp in your dashboard to detect unused or compromised keys.
Never commit keys to Git
Never commit keys to Git
Add environment files to
.gitignore:.gitignore
Rate Limiting
API keys are subject to rate limits to prevent abuse:| Limit Type | Value |
|---|---|
| Requests per minute | 100 |
| Memories per user | Unlimited |
| Concurrent requests | 10 |
Need higher limits? Contact support to discuss enterprise plans.
Error Handling
Handle authentication errors gracefully:Next Steps
Memory Isolation
Learn more about tenant and user isolation
API Reference
Explore the API key management endpoints
Integration Guide
See authentication in action
Troubleshooting
Fix common authentication issues