API Reference
Base URL: https://hub.morphism.systems/api
Authentication
All API endpoints accept one of two auth methods:
- Session cookie — automatic via the dashboard (Clerk)
- API key — for CI/CD and external integrations. Create keys in Settings → API Keys.
curl -X POST https://hub.morphism.systems/api/drift-report \
-H "Authorization: Bearer mk_live_abc123..." \
-H "Content-Type: application/json" \
-d '{"agent_name": "my-agent", "drift_score": 18.5}'Endpoints
POST
/api/validateValidate an AI agent configuration against Morphism governance axioms using Claude AI.
Auth
Session cookie (Clerk)
Request Body
{
"config": {
"name": "support-bot",
"model": "gpt-4",
"temperature": 0.7,
"max_tokens": 4096,
"system_prompt": "You are a helpful assistant..."
}
}Response
{
"valid": true,
"violations": [],
"risk_score": 15,
"recommendations": ["Add output filtering for PII"]
}POST
/api/drift-reportReport a drift score for an agent. Scores are smoothed with exponential moving average (α=0.3). Automatically creates an assessment if drift > 25.
Auth
Bearer API key
Request Body
{
"agent_name": "support-bot",
"drift_score": 28.5,
"metadata": {
"provider": "openai",
"region": "us-east-1"
}
}Response
{
"agent_id": "uuid",
"new_drift_score": 21.3,
"assessment_created": true,
"assessment_id": "uuid"
}GET
/api/keysList all API keys for the current organization. Returns prefixes only — full keys are never stored.
Auth
Session cookie (Clerk)
Response
{
"keys": [
{
"id": "uuid",
"name": "CI Pipeline",
"prefix": "mk_live_a1b2c3d4...",
"last_used_at": "2026-02-08T...",
"created_at": "2026-02-07T..."
}
]
}POST
/api/keysCreate a new API key. The raw key is returned ONCE and never stored.
Auth
Session cookie (Clerk)
Request Body
{ "name": "CI Pipeline" }Response
{
"key": "mk_live_a1b2c3d4e5f6..."
}DELETE
/api/keys?id=uuidRevoke an API key permanently.
Auth
Session cookie (Clerk)
Response
{ "deleted": true }POST
/api/assessmentsCreate a new governance assessment with AI-powered risk analysis.
Auth
Session cookie (Clerk)
Request Body
{
"agent_id": "uuid",
"assessment_type": "drift",
"config": { ... }
}Response
{
"id": "uuid",
"risk_score": 42,
"findings": [
{
"severity": "high",
"category": "drift",
"description": "Agent output divergence exceeds threshold",
"recommendation": "Retrain with updated governance constraints"
}
]
}GET
/api/healthHealth check endpoint.
Auth
None
Response
{
"status": "ok",
"timestamp": "2026-02-08T..."
}Rate Limits
| Plan | Requests / minute | Agents | Assessments / month |
|---|---|---|---|
| Free | 30 | 3 | 50 |
| Pro | 300 | 25 | Unlimited |
| Enterprise | Custom | Unlimited | Unlimited |
SDKs & CLI
Coming soon:
@morphism-systems/sdk— TypeScript/Node.js SDKmorphism-py— Python SDKmorphism— CLI (Homebrew/npm)