Skip to Content

Authentication

Cortex uses JWT (JSON Web Tokens) for API authentication and GitHub OAuth for the web dashboard.

Web Dashboard

The frontend uses NextAuth.js  with GitHub as the OAuth provider. When you sign in:

  1. You’re redirected to GitHub for authorization
  2. GitHub returns an OAuth token
  3. NextAuth creates a session and JWT
  4. The JWT is sent to the backend with every API request

No passwords are stored. Your GitHub identity is your Cortex identity.

API Authentication

All authenticated endpoints require a Bearer token in the Authorization header:

curl -H "Authorization: Bearer YOUR_JWT_TOKEN" \ https://api.cortex-app.dev/api/workspace/notes

Getting a Token

API key generation is coming soon. For now, tokens are issued through the OAuth flow.

Public Endpoints

These endpoints require no authentication:

EndpointDescription
GET /healthHealth check
GET /api/demo/graphDemo graph data
GET /api/demo/askDemo AI query
GET /api/pricingTier pricing info

Authenticated Endpoints

These endpoints require a valid JWT:

EndpointDescription
POST /api/workspace/notesCreate a note
PUT /api/workspace/notes/:idUpdate a note
GET /api/graph/notesList all notes
POST /api/askAI-powered recall query
GET /api/activity/streamSSE activity stream
GET /api/quotaUsage quota info

Rate Limits

Rate limits are determined by your pricing tier:

TierQueries/MonthSonnet QueriesVoice Responses
Free5000
Student ($5)Unlimited2015
Pro ($12)Unlimited10060
Power ($30)UnlimitedUnlimited200
Last updated on