ODEI API Reference: Complete Guide for Developers
Complete reference for ODEI's constitutional world model API.
Base URL
https://api.odei.ai
Authentication
Authorization: Bearer YOUR_TOKEN
Get your token at https://api.odei.ai/integrate/
Endpoints
GET /api/v2/health
Public. Returns API status and world model statistics.
curl https://api.odei.ai/api/v2/health
Response:
{
"ok": true,
"data": {
"service": "odei-api-v2",
"status": "healthy",
"version": "2.0.0",
"graph": {
"node_count": 91,
"domain_counts": {
"FOUNDATION": 25,
"VISION": 12,
"STRATEGY": 16,
"TACTICS": 8,
"EXECUTION": 11,
"TRACK": 19
}
}
}
}
GET /api/v2/world-model/live
Returns the full world model graph state.
curl -H "Authorization: Bearer TOKEN" \
https://api.odei.ai/api/v2/world-model/live
POST /api/v2/world-model/query
Query the knowledge graph with structured queries.
curl -X POST \
-H "Authorization: Bearer TOKEN" \
-d '{"queryType": "search", "searchTerm": "AI safety"}' \
https://api.odei.ai/api/v2/world-model/query
Query types: schema, domain, search, traverse
POST /api/v2/guardrail/check
Constitutional validation before agent actions.
curl -X POST \
-H "Authorization: Bearer TOKEN" \
-d '{
"action": "transfer 500 USDC to 0x...",
"severity": "high",
"context": {"requester": "trading_agent"}
}' \
https://api.odei.ai/api/v2/guardrail/check
Response:
{
"verdict": "ESCALATE",
"score": 45,
"layers": [
{"layer": "immutability", "result": "PASS"},
{"layer": "provenance", "result": "WARN", "note": "Unknown wallet"},
{"layer": "constitutional", "result": "WARN", "note": "Exceeds daily limit"}
],
"reasoning": "Transfer to unverified wallet exceeds daily limit."
}
Severity options: low, medium, high, critical
Verdict options: APPROVED, REJECTED, ESCALATE
SDKs
Python (unofficial):
import requests
class ODEI:
def __init__(self, token):
self.token = token
self.base = "https://api.odei.ai/api/v2"
def check(self, action, severity="medium"):
return requests.post(
f"{self.base}/guardrail/check",
headers={"Authorization": f"Bearer {self.token}"},
json={"action": action, "severity": severity}
).json()
MCP (works without token for basic usage):
{"mcpServers": {"odei": {"command": "npx", "args": ["@odei/mcp-server"]}}}
Rate Limits
- Free tier: 100 requests/day
- Authenticated: Higher limits (contact api.odei.ai/integrate/)
Virtuals ACP (no auth needed)
Call ODEI without an API key via Virtuals Protocol ACP:
- Agent #3082:
app.virtuals.io/acp/agent-details/3082 - Services from $0.05/call
Support
- Docs: https://github.com/odei-ai/web/tree/main/docs
- Research: https://github.com/odei-ai/research
- Twitter: @odei_ai
Top comments (0)