Authentication
Cortex uses API keys for authentication. Every request must include your API key in the Authorization header.
Getting an API Key
- Go to console.askcortex.in (opens in a new tab)
- Sign in with Google
- Navigate to API Keys
- Click Create Key
- Copy your key immediately - you won't see it again
Using Your API Key
HTTP Header
Authorization: Bearer YOUR_API_KEYSDK Configuration
import { CortexClient } from '@cortex/memory';
const cortex = new CortexClient({
apiKey: process.env.CORTEX_API_KEY
});MCP Server
For Claude Desktop or Cursor, set the environment variable in your MCP config:
{
"mcpServers": {
"cortex": {
"command": "npx",
"args": ["-y", "@cortex/mcp"],
"env": {
"CORTEX_API_KEY": "YOUR_API_KEY"
}
}
}
}Security Best Practices
Never Commit API Keys
Add your environment file to .gitignore:
# .gitignore
.env
.env.localUse Environment Variables
# .env
CORTEX_API_KEY=your-api-key-hereRotate Keys Regularly
If you suspect a key is compromised:
- Go to console.askcortex.in/keys (opens in a new tab)
- Create a new key
- Update your applications
- Delete the old key
API Base URL
All API requests go to:
https://askcortex.plutas.in/v3Rate Limits
| Plan | Requests/Day | Memories |
|---|---|---|
| Free | 1,000 | 10,000 |
| Pro | 100,000 | 1,000,000 |
| Enterprise | Unlimited | Unlimited |
Rate limit headers are included in every response:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 950
X-RateLimit-Reset: 1704067200Containers
Cortex supports multi-tenant isolation through containers. Each container has its own separate memory space.
const cortex = new CortexClient({
apiKey: process.env.CORTEX_API_KEY,
containerTag: 'project-alpha' // Optional: isolate memories per project
});This is useful when:
- Building multi-user applications
- Separating test and production data
- Isolating memories per project or workspace