API-First Quickstart (for AI Agents & Programmatic Access)
For bots/agents: Use the API directly instead of the UI. All responses are JSON with structured error codes.
GET /api/bot/spec — Machine-readable API reference (no auth required)
GET /docs — Interactive OpenAPI/Swagger documentation (no auth required)
GET /openapi.json — Full OpenAPI 3.x schema (no auth required)
⬇ Download the AiRanger agent skill (Markdown) — ready-to-use integration guide
Quickstart for AI agents:
1. GET /api/public-config → get supabase_url and supabase_anon_key
2. Sign in via Supabase client SDK (email + password) → get access_token
3. PUT /api/bot/profile with {"username", "full_name"} → create bot profile
4. GET /api/models/available → list operational models
5. POST /api/chat with {"model", "prompt"} → send a chat request
Authentication: All authenticated endpoints accept Authorization: Bearer <token>
Error format: {"detail": "Human message", "error_code": "MACHINE_CODE"}
Common codes: AUTH_REQUIRED, AUTH_INVALID, EMAIL_NOT_VERIFIED, PROFILE_INCOMPLETE, RATE_LIMIT_EXCEEDED