Base URL: https://rhea-tribunal.fly.dev • All authenticated endpoints require Authorization: Bearer <token>
Authentication
POST/auth/signup
Create a new account with email and password. Returns a JWT token and 100 free credits.
Body: {{"email": "you@example.com", "password": "..."}} Response: {{"token": "eyJ...", "user_id": 1, "credits": 100}}
POST/auth/login
Authenticate with email and password. Returns a fresh JWT token.
Body: {{"email": "you@example.com", "password": "..."}} Response: {{"token": "eyJ...", "user_id": 1}}
GET/auth/profile
Retrieve your account profile, credit balance, and plan tier. Requires Bearer token.
Response: {{"user_id": 1, "email": "...", "credits": 85, "plan": "free", "role": "user"}}
Iterative Consensus Evolution (ICE) — multi-round critique and refinement. More expensive but higher accuracy.
Body: {{"prompt": "...", "k": 5, "rounds": 2, "tier": "cheap", "chairman_tier": "balanced"}} Parameters: rounds (1–5 critique rounds). Response includes round_history and convergence_achieved.
POST/tribunal/sceptic
Adversarial verification mode. Models actively challenge the claim and generate counterarguments.
Body: {{"prompt": "...", "k": 5, "devil_advocate": true}} Response includes: counterarguments list and strongest_challenge.
Aletheia — Proof Storage
POST/aletheia/capture
Store a verified proof with provenance chain. Accepts a tribunal response or manual entry.
Body: {{"claim": "...", "verdict": "supported", "confidence": 0.87, "sources": [...]}}
GET/aletheia/search
Semantic search over stored proofs.
Query params: q (search term), limit (default 10), ontology (filter by domain).
Response: list of matching proofs with relevance scores.
GET/aletheia/stats
Aggregate statistics: proof count, ontology count, average confidence, recent activity.
No authentication required. Response: {{"proof_count": 42, "ontology_count": 6, "avg_confidence": 0.84}}
GET/aletheia/ontology
List available ontology lenses (general, pharmacology, biochemistry, logic, topology, systems_biology).
Billing
GET/billing/plans
List available plans with pricing, credit allocations, and feature sets. No authentication required.
POST/billing/checkout
Create a Stripe checkout session for plan upgrade.
Body: {{"plan": "pro"}}. Response: {{"checkout_url": "https://checkout.stripe.com/..."}}
GET/billing/keys
List your active API keys (rk_... format) for programmatic access without JWT.
Infrastructure
GET/health
Service health check. Returns provider availability, model count, and execution profile. No authentication required.
Response: {{"status": "ok", "providers_available": 3, "total_models": 12}}
GET/models
Full list of configured model providers, available models per tier, and their current status.
Response includes per-provider model lists and availability flags.
GET/agents/status
Office agent status dashboard — shows active agents (Rex, Orion, Hyperion, GPT), pending message counts, lease status, and last activity. Requires authentication.
GET/feed/stream
Server-Sent Events (SSE) stream of live office radio — inter-agent messages, system events, and broadcast alerts. Connect with EventSource in a browser or curl with --no-buffer.
Event format: data: {{"type": "radio", "source": "REX", "body": "..."}}
Rate Limits and Error Codes
All endpoints enforce per-key rate limits. Default: 30 requests/minute, 1,000 requests/day. Exceeded limits return HTTP 429 with a Retry-After header.
401 Unauthorized — Missing or invalid token/API key.
429 Too Many Requests — Rate limit or quota exceeded.
422 Unprocessable Entity — Request body validation failed (see detail field).
500 Internal Server Error — Unexpected server error. If this persists, please report it.
Interactive Docs
FastAPI generates interactive OpenAPI documentation automatically: openapi.json (machine-readable schema). You can load this into Postman, Insomnia, or any OpenAPI-compatible client.