Skip to content

Health and Metrics

Operational endpoints are unauthenticated so probes and monitoring stacks can reach them directly.

GET /health

Returns the overall health of the service.

Response

Status: 200 OK when the model is loaded; non-2xx when not ready.

json
{
  "status": "healthy",
  "ready": true,
  "message": "2 model(s) ready",
  "models": [
    {
      "model_id": "minishlab/potion-multilingual-128M",
      "status": "ready",
      "message": "model loaded"
    }
  ]
}

Field descriptions

FieldTypeDescription
statusstring"healthy" or "unhealthy"
readybooleanWhether the service can serve requests
messagestringHuman-readable state description
modelsModelStatus[]Per-model load status

GET /ready

Alias for /health intended for Kubernetes readiness probes.

Response

Same as /health.

GET /metrics

Returns Prometheus-compatible metrics.

Response

Status: 200 OK

Content-Type: text/plain; version=0.0.4

Example output

text
# HELP http_requests_total Total HTTP requests
# TYPE http_requests_total counter
http_requests_total{method="POST",path="/v1/embeddings",status="200",model="minishlab/potion-multilingual-128M"} 42

# HELP http_request_duration_seconds HTTP request latency
# TYPE http_request_duration_seconds histogram
http_request_duration_seconds_bucket{method="POST",path="/v1/embeddings",model="minishlab/potion-multilingual-128M",le="0.05"} 12
...

# HELP http_errors_total Total HTTP 5xx errors
# TYPE http_errors_total counter
http_errors_total{status="500"} 0

Exposed metrics

MetricTypeLabelsDescription
http_requests_totalcountermethod, path, status, modelTotal request count
http_request_duration_secondshistogrammethod, path, modelRequest latency
http_errors_totalcounterstatus5xx error count

Request correlation

Every request is assigned a correlation ID. The ID is returned in the x-request-id response header and included in structured logs, but it is not exposed in response bodies or metrics labels.

Powered by model2vec