| Crates.io | llm-sentinel-api |
| lib.rs | llm-sentinel-api |
| version | 0.1.0 |
| created_at | 2025-11-06 08:22:26.491236+00 |
| updated_at | 2025-11-06 08:22:26.491236+00 |
| description | REST API server with health checks, Prometheus metrics, and query endpoints for LLM-Sentinel |
| homepage | https://github.com/globalbusinessadvisors/llm-sentinel |
| repository | https://github.com/globalbusinessadvisors/llm-sentinel |
| max_upload_size | |
| id | 1919284 |
| size | 140,010 |
REST API server with health checks, metrics, and query endpoints for LLM-Sentinel.
Production-ready REST API built with Axum:
[dependencies]
llm-llm-sentinel-api = "0.1.0"
use llm_sentinel_api::{ApiServer, ApiConfig};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let config = ApiConfig {
bind_addr: "0.0.0.0:8080".parse()?,
enable_cors: true,
..Default::default()
};
let server = ApiServer::new(config);
server.start().await?;
Ok(())
}
GET /health/live - Liveness probeGET /health/ready - Readiness probeGET /metrics - Prometheus metricsGET /api/v1/telemetry - Query telemetryGET /api/v1/anomalies - Query anomaliesApache-2.0