Skip to content

API Reference: Auxiliary Endpoints

The TensorZero Gateway exposes several auxiliary endpoints for monitoring and debugging.

GET /metrics

The TensorZero Gateway exposes a Prometheus-compatible /metrics endpoint for monitoring.

At the moment, the only available metric is request_count, which counts the number of successful requests to the gateway. The metric reports counts for both inference and feedback requests.

Example Response

GET /metrics
# ...
request_count{endpoint="inference",function_name="draft_email"} 10
request_count{endpoint="feedback",metric_name="draft_accepted"} 10
# ...

GET /status

The /status endpoint is a simple liveness probe. It returns HTTP status code 200 if the gateway is running.

Example Response

GET /status
{ "status": "ok" }

GET /health

The /health endpoint is a simple readiness probe that checks if the gateway can communicate with the database. It returns HTTP status code 200 if the gateway is ready to serve requests.

Example Response

GET /health
{ "gateway": "ok", "clickhouse": "ok" }