Defend

API

HTTP endpoints for guarding input and output, session management, and health checks for the Defend service.

Base URL is your deployed host (for local development, http://localhost:8000). All versioned routes in this release live under /v1.

Guard endpoints

Evaluate text at the two integration points: before your LLM and before you return model output. Send JSON bodies; responses include action, session_id, score, modules_triggered, and latency_ms.

Session and operations

Inspect or clear server-side session state, and probe process health for load balancers and observability.

Interactive OpenAPI

When you run defend serve, open /docs on the FastAPI app for a live OpenAPI UI against your instance.