Skip to content

Endpoints

hlid listens on bind_addr (default 127.0.0.1:8080) and exposes:

Inference

MethodPathDialect
POST/v1/messagesAnthropic Messages
POST/v1/messages/count_tokensAnthropic token count
POST/v1/chat/completionsOpenAI Chat Completions
POST/v1/responsesOpenAI Responses
POST/v1/completionsOpenAI Completions (legacy)

The path tells hlid what dialect the agent speaks. The model in the body tells it where to go. Streaming is requested the way each dialect already does it ("stream": true).

Discovery

MethodPathPurpose
GET/v1/modelsModel list

Observability

MethodPathPurpose
GET/hlid/requestsAll recent request captures
GET/hlid/requests/<id>A single capture
GET/healthHealth check — {"status": "ok"}

Auth

When auth_key is configured, every endpoint requires it, sent either way:

Authorization: Bearer <key>
x-api-key: <key>

Failures return a 401 in the dialect of the endpoint — an OpenAI-shaped error body on OpenAI paths, an Anthropic-shaped one on Anthropic paths — so SDKs surface the error cleanly instead of choking on an unexpected shape.

Errors

All errors are dialect-native for the endpoint that received the request:

  • Unknown model (no registry match) → 404-family error naming the model
  • Upstream failure → the backend's status and message, passed through
  • Timeout → 504-family error after request_timeout_secs

MIT licensed · built at the workbench