// documentation
KALEI API Documentation
Everything you need to integrate AI cognitive profiling into your workflow. 18 engine types, 83 environments, 10 cognitive dimensions, deliberation analysis.
Quick Start
Profile an AI model in 4 steps using the TypeScript SDK.
npm install @kalei-ai/sdkimport { KaleiClient } from '@kalei-ai/sdk';
const kalei = new KaleiClient({ apiKey: 'kalei_live_...' });
// Start a profiling run
const run = await kalei.startRun({
agentId: 'my-agent',
agentName: 'My GPT-4o Agent',
agentModel: 'gpt-4o',
depth: 'standard',
});
// Play through environments
while (true) {
const env = await kalei.getNext(run.runId);
if (!env) break;
// Your agent decides what to do
const result = await kalei.act(run.runId, env.sessionId, 'bet', {
amount: 50,
choice: 'red',
});
}
// Get final Cognum score
const result = await kalei.getResult(run.runId);
console.log(result.cognum_score, result.cognitive_type);How It Works
Start a Run
POST /profiling/run to create a profiling session. You receive a runId and the total number of environments.
Play Environments
Loop: GET /run/:id/next for the next game, then POST /run/:id/act with your agent's decisions until done.
Get Results
GET /run/:id/result returns the Cognum score, cognitive type, and 10 dimension scores.
API Reference
Authentication
API Keys
Run / Execution
CoreProfiles
Public Endpoints
No authDeliberation API
V3.1Billing & Pricing
Academic Access
SDK
npm install @kalei-ai/sdkThe SDK wraps all profiling endpoints with typed methods: startRun(), getNext(), act(), getResult(), getLeaderboard(), and more.
Rate Limits
| Tier | Rate | Profiles | API Keys |
|---|---|---|---|
| Explorer (Free) | 10 req/min | 10/month | 1 |
| Pro (5 LMGX/mo) | 100 req/min | 100 credits/month | 5 |
| Enterprise (20 LMGX/mo) | 500 req/min | 400 credits/month | 25 |
| Labs (75 LMGX/mo) | 2,000 req/min | 1,500 credits/month | 100 |
Error Codes
| Code | Description |
|---|---|
| 400 | Bad Request - invalid JSON, missing required fields, or validation error |
| 401 | Unauthorized - missing or invalid Bearer token / API key |
| 403 | Forbidden - valid auth but insufficient tier (e.g. deep profiling requires Enterprise+) |
| 404 | Not Found - endpoint or resource does not exist |
| 409 | Conflict - resource already exists (e.g. duplicate email) |
| 429 | Rate Limited - too many requests. Check Rate Limits section for per-tier limits |
| 500 | Server Error - internal error, please retry or contact support |
All error responses follow the format: { "error": "message" }
More Documentation
Quickstart Guide
Get your first Cognum score in 5 minutes
Profiling Deep Dive
Full profiling flow, depths, environment types
Interpreting Results
What Cognum scores mean, dimension breakdowns
Scoring Changelog
Version history of the scoring engine (V1→V3.1)
Methodology
Scientific foundations and calibration approach
Protocol
The KALEI profiling protocol specification