---
audience: developer
summary: Liveness, readiness, Prometheus metrics.
title: Health and metrics API
path: reference/api/health-and-metrics
status: published
---

# Health and metrics API

2 endpoints. Outside `/v1/`. Unauthenticated.

| Method | Path | Purpose |
|---|---|---|
| `GET` | `/health` | Readiness probe. |
| `GET` | `/metrics` | Prometheus scrape endpoint. |

## GET /health

```bash
curl https://your-host/health
```

```json
{
  "status": "ok",
  "checks": {
    "database": "ok",
    "redis": "ok",
    "nats": "ok",
    "weaviate": "ok",
    "version": "1.1.0"
  }
}
```

Returns 200 when all checked dependencies are reachable; 503 if
any is failing. Use as a Kubernetes readiness probe (and a slower
liveness probe with retries — DB hiccups shouldn't restart the pod).

## GET /metrics

Prometheus text format. Configure your scraper to hit this on
every API pod.

Useful metric families:

- `scaiwave_http_requests_total` — labelled by route, method, status.
- `scaiwave_http_request_duration_seconds` — histogram.
- `scaiwave_ai_tokens_total{tenant, model, direction}` — counter.
- `scaiwave_ws_connections{tenant}` — gauge.
- `scaiwave_arq_queue_depth{queue}` — gauge.
- `scaiwave_arq_jobs_total{function, status}` — counter.
- `scaiwave_search_queries_total{type, status}` — counter.
- `scaiwave_search_latency_seconds` — histogram.
- `scaiwave_scaikey_reconcile_diffs_total` — drift counter for
  identity sync.
- `scaiwave_call_active{tenant}` — gauge of in-flight calls.

The `version` of the running build is also exposed as a label on
the `scaiwave_build_info` gauge for dashboards that need to know
what's running.
