🔌 API Reference

Complete API documentation for ChaozCode platform

🔐 Authentication

All API requests require authentication via API key or session cookie.

POST /api/auth/login

Authenticate user and create session

POST /api/auth/login
Content-Type: application/json

{
  "username": "user@example.com",
  "password": "your-password"
}
Response:
{
  "ok": true,
  "user": {
    "id": 1,
    "username": "user@example.com",
    "role": "user"
  }
}
GET /api/auth/check

Check current authentication status

Response:
{
  "authenticated": true,
  "user": {
    "id": 1,
    "username": "user@example.com",
    "role": "user"
  }
}

🧠 Memory Spine

Access persistent memory and context management.

POST /api/memory-spine/memory/store

Store a memory in the system

POST /api/memory-spine/memory/store
Content-Type: application/json

{
  "id": "memory-123",
  "content": "Important information",
  "tags": ["project", "important"]
}
GET /api/memory-spine/memory/search

Search stored memories

GET /api/memory-spine/memory/search?query=project&limit=10

🔍 Zearch

AI-powered search and research engine with 623 API endpoints across 26 route modules. Port 5001.

POST /api/zearch/universal/query

Universal AI query endpoint — auto-detects intent and routes to optimal handler

POST /api/zearch/universal/query
Content-Type: application/json

{
  "query": "Find authentication code",
  "context_type": "code"
}
POST /api/zearch/research/deep

Multi-source research synthesis (web + academic + codebase)

POST /api/zearch/codebase/analyze

Full codebase structure analysis — 60+ file types, dependencies, metrics

Full Swagger UI: http://127.0.0.1:5001/docs — 623 endpoints available.

⚡ Rate Limits

Rate Limits:
  • Free tier: 100 requests/hour
  • Pro tier: 1,000 requests/hour
  • Enterprise: Unlimited

🔑 Getting Your API Key

Generate and manage your API keys in the Settings page.

Go to Settings

💬 Need Help?

For additional support or questions about the API:

Contact Support Getting Started Guide