How-To Series · Episode 48 / 59 · Module 7: Power Tools

Hermes · API Server

OpenAI-compatible endpoint. Point any client at it.

After this videoYou can now expose Hermes as an HTTP API to any tool that speaks OpenAI.

The API server exposes Hermes as an OpenAI-compatible HTTP endpoint. Any OpenAI-format frontend, Open WebUI, LobeChat, LibreChat, the OpenAI SDK, curl, can use Hermes as its backend, with the full toolset behind it. Enable with API_SERVER_ENABLED=true + API_SERVER_KEY in .env, then hermes gateway; it listens on http://127.0.0.1:8642. Point any client at /v1 with the key as a bearer token (OpenAI SDK: set base_url). Two endpoints: /v1/chat/completions (stateless) and /v1/responses (server-side state via previous_response_id or a named conversation). A frontend system prompt layers on top of the core prompt. Multi-user via profiles (own port + key, profile name as model). Security: full toolset incl terminal, key required off-loopback, CORS off by default.

About these resources. Every command in this video comes from the API Server doc.

Sources · What this video distills

1 docs page · every command below traces to one of them
Primary · OpenAI-compatible endpoints, enablement, chat/completions + responses, system-prompt layering, profiles, security
API Server
Read ↗

Commands shown · Copy and paste

each shows the source doc it came from
Enable (.env)from source ↗
API_SERVER_ENABLED=true · API_SERVER_KEY=change-me
hermes gateway # → listening on http://127.0.0.1:8642
Connect (curl)from source ↗
curl http://localhost:8642/v1/chat/completions -H "Authorization: Bearer change-me" -d '{"model":"hermes-agent","messages":[{"role":"user","content":"Hello!"}]}'
OpenAI SDKfrom source ↗
OpenAI(base_url="http://localhost:8642/v1", api_key="change-me")

Going deeper · Related Hermes docs

further reading · not sources of facts shown above

Next in the series · Episodes that build on this

E47
As a Python Library
E49
In Your Editor (ACP)
E50
The Provider Landscape