Skip to content

API & Route Contract

Hermes-Relay crosses three independent server surfaces. They may run on the same machine, but they do not share a base URL, authentication model, or owner. Use this page to choose the right contract before reaching for an endpoint.

Keep credentials in their lane

A dashboard cookie is not an API key. An API bearer is not a Relay session. Relay accepts the Hermes API bearer only on its explicitly documented voice routes; all other protected Relay routes require pairing and the appropriate session grant.

Ownership at a glance

SurfaceOwnerBase URLPrimary authenticationRelay required?
API ServerUpstream Hermeshttp(s)://host:8642Optional API_SERVER_KEY bearerNo
Dashboard / GatewayUpstream Hermeshttp(s)://host:9119Dashboard session; short-lived WS ticket for /api/wsNo
RelayHermes-Relay pluginws(s)://host:8767 and matching HTTP(S) originPairing code, then Relay session token and grantsYes
Compatibility hookHermes-Relay plugin, older hosts onlyInjected into the API serverSame auth as the host API serverNo, but non-upstream

Client routing contract

Hermes-Relay chooses routes by capability and authentication state:

  1. Probe API-server GET /v1/capabilities.
  2. If Manage authentication is ready, obtain a dashboard WS ticket and prefer /api/ws for chat with live reasoning.
  3. Otherwise use native /api/sessions/{id}/chat/stream over SSE.
  4. Fall back to /v1/chat/completions or /v1/runs only when the native session surface is unavailable.
  5. Use dashboard /api/audio/* for Vanilla Hermes voice.
  6. Contact Relay only for paired, additive power features.

Chat, Manage, and Vanilla Hermes voice must continue to work against an unmodified upstream Hermes installation. Relay routes never become a hidden dependency for that default path.

Contract labels

The reference uses these labels consistently:

LabelMeaning
UpstreamOwned and served by unmodified Hermes Agent
RelayOwned by the optional Hermes-Relay plugin/server
LoopbackCallable only from the Hermes host
PairedRequires a Relay session token and the named grant
SideloadRequires the Android sideload build; Google Play fails closed
ExperimentalWire shape or behavior may change between minor releases
CompatibilityOlder-host fallback; never the preferred native path

Reference map

Source of truth

GET /v1/capabilities is authoritative for a running Hermes API Server. Relay routes are registered in plugin/relay/server.py. The public reference records only surfaces Hermes-Relay consumes or exposes; it is not a complete reference for every endpoint in the Hermes dashboard.