# Administer the relay and inspect headers

Source: https://usecns.dev/thalamus-topic-administer-the-relay-and-inspect-headers/

[Start here](https://usecns.dev/manual-thalamus/)
[CLI commands](https://usecns.dev/commands-thalamus/)
[Configuration & integration](https://usecns.dev/thalamus-topics/)

Protect the listener, especially admin routes, with a trusted network or an authenticated reverse proxy. The router has no built-in authentication middleware. Public exposure requires a separate security decision.

This applies to inference, model listing, health, status, mutations and metrics alike: no API-key validation or per-route authorization exists. The CLI exposes no auth-token/header option; arrange access through your network/proxy policy rather than looking for a nonexistent `THALAMUS_API_KEY` setting.

Policy updates are mutations, not settings reads. POST `/admin/v1/policy`, `/lb/policy` and `/lb/reset` all reset statistics and pins, even with an empty body. Account for that reset before changing admission or selection settings.

* [GET /health, /lb/health](https://usecns.dev/thalamus-http-administer-the-relay-and-inspect-headers-get-health-lb-health/)
* [GET /admin/v1/status, /lb/status](https://usecns.dev/thalamus-http-administer-the-relay-and-inspect-headers-get-admin-v1-status-lb-status/)
* [GET /lb/metrics](https://usecns.dev/thalamus-http-administer-the-relay-and-inspect-headers-get-lb-metrics/)
* [GET /metrics](https://usecns.dev/thalamus-http-administer-the-relay-and-inspect-headers-get-metrics/)
* [POST /admin/v1/members](https://usecns.dev/thalamus-http-administer-the-relay-and-inspect-headers-post-admin-v1-members/)
* [POST /admin/v1/members/{name}/drain](https://usecns.dev/thalamus-http-administer-the-relay-and-inspect-headers-post-admin-v1-members-name-drain/)
* [DELETE /admin/v1/members/{name}](https://usecns.dev/thalamus-http-administer-the-relay-and-inspect-headers-delete-admin-v1-members-name/)
* [POST /admin/v1/policy, /lb/policy, /lb/reset](https://usecns.dev/thalamus-http-administer-the-relay-and-inspect-headers-post-admin-v1-policy-lb-policy-lb-reset/)
* [POST /lb/sampler/start](https://usecns.dev/thalamus-http-administer-the-relay-and-inspect-headers-post-lb-sampler-start/)
* [POST /lb/sampler/stop](https://usecns.dev/thalamus-http-administer-the-relay-and-inspect-headers-post-lb-sampler-stop/)

Routed upstream responses include `x-thalamus-node`, `x-thalamus-plane`, `x-thalamus-policy`, `x-thalamus-sticky-hit`, `x-thalamus-work-stolen`, `x-thalamus-queue-wait-ms`. Intelligence selections also include `x-thalamus-session-id` and `x-thalamus-session-source`. Do not expect routing headers on preselection error responses. Policy headers use legacy values (`sticky_least_loaded_3node`, `round_robin_3node`, `single_node`); prefer `policy_canonical` in status for canonical names.

An optional `legacy_header_prefix` emits `<prefix>-backend` (same value as node), `-policy`, `-sticky-hit`, `-session-id`, `-session-source`. It does not duplicate plane, stolen or queue-wait headers. Prefixes must be nonempty lowercase ASCII letters/digits with single internal hyphens, no leading/trailing hyphen, and not `x-thalamus`. Unset emits only the canonical family. Historical policy names and `/lb/*` aliases are compatibility surfaces, not topology guarantees.

Successful register, drain and remove return 200 JSON `{"status":"registered|draining|removed","member":{...}}` (one corresponding status string, not the literal alternatives). Policy mutations return the full status object. Omitted policy fields leave settings unchanged but still reset counters, inflight accounting, recent in-memory requests and pins; durable telemetry is not cleared. `active_nodes: []` removes the intelligence filter; an omitted filter preserves it. Blank `single_node` does not clear the preferred name. These updates are in-memory, not config-file edits; avoid resetting while requests are active if you rely on current inflight counts.