api (FastAPI backend)
Data retention (api)
Theapi service runs a daily purge with per-tier windows. For paid tiers
only the prompt/response bodies are wiped after the window (metadata and safety
scores are kept); free and unknown accounts have their rows deleted entirely.
Override any window with RETENTION_DAYS_<TIER>.
Managed-cloud accounts on Business and Enterprise can additionally enable zero content retention (Settings → Data Retention), which stops prompt/response bodies being written at all — safety scoring still runs from the in-flight request. See the security page.
proxy (Go reverse proxy)
web (Next.js dashboard)
safety_worker (safety scoring worker)
Docker Compose shared variables
When usinginfra/docker-compose.yml, these variables are set in .env at the repo root and shared across services via env_file:
In Docker Compose, service hostnames resolve to container names (e.g.,
postgres, redis, api). In Railway or Kubernetes, use the actual service URLs provided by your infrastructure.
