Independent resource · Not affiliated with HarnessRouter · Site data checked 21 Aug 2026
API reference

UHP HTTP API map

A verified map of the normative Unified Harness Protocol HTTP surface from specification version 2026-08-11, grouped by capability. This is the contract a conformant server implements — not a HarnessRouter-specific route list.

Verified: Protocol: 2026-08-11Static HTML/CSS
Normative, not implementation-specific: every endpoint below is taken from the 2026-08-11 specification. HarnessRouter Community Edition is the reference implementation; a different conformant server may implement a subset according to its declared conformance class and capabilities, and may expose additional non-normative routes. Do not treat a HarnessRouter-only route as UHP.

Transport and auth

  • All requests are HTTP over TLS (loopback plaintext is permitted for development).
  • Every endpoint except GET /v1/uhp requires Authorization: Bearer <token>.
  • Version is negotiated with the UHP-Version request/response header; every response, including errors, carries the version actually used.
  • Before using anything above Core, read GET /v1/uhp and rely only on advertised capabilities.

1. Discovery and versioning

EndpointMethodPurposeClass
/v1/uhpGETCapability discovery: protocol versions, default version, conformance class, capability booleans, and implementation identity. Served without a bearer token.Always
UHP-Version (header)request / responseDeclare or learn the negotiated protocol version; absent on request means the server's default.Always

2. Harnesses and models

EndpointMethodPurposeClass
/v1/harnessesGETList configured harnesses in the caller's scope (the list MAY be empty).Core
/v1/harnesses/{harness_id}GETFetch one harness object; 404 with harness_not_found if unknown.Core
/v1/modelsGETModel catalog grouped by backend, with per-model availability.Core
/v1/harnesses/{harness_id}/modelsGETModels available for a specific harness.Core
/v1/harnessesPOSTCreate a harness; 422 with unsupported_base for an unsupported base.Full
/v1/harnesses/{harness_id}PUTReplace mutable configuration. MUST NOT change id, base, or createdAt.Full
/v1/harnesses/{harness_id}DELETEDelete a harness. MUST NOT delete its sessions or responses.Full
/v1/harnesses/{harness_id}/skills/{skill_id}/filesGETList a skill's complete file set for round-trip integrity.Full

3. Responses and tasks

EndpointMethodPurposeClass
/v1/responsesPOSTRun a task. Bodies carry input, model, metadata.harness_id, stream, previous_response_id, and optional budgets/instructions/tools.Core
/v1/responses/{response_id}GETRead a stored response back.Core
/v1/responses/{response_id}/input_itemsGETReconstruct the input the task was created with.Core
/v1/responses/{response_id}/cancelPOSTCancel a running task.Core
/v1/responses/{response_id}DELETEDelete a stored response. MUST NOT cancel a running task.Core
Idempotency-Key (header)requestMake a submit idempotent when the idempotency capability is advertised.Capability

4. Sessions and cancellation

EndpointMethodPurposeClass
/v1/sessionsGETList sessions, cursor-paginated.Extended
/v1/sessions/{session_id}GETInspect a session.Extended
/v1/sessions/{session_id}/turnsGETOrdered task history of a session.Extended
/v1/sessions/{session_id}/cancelPOSTCancel whatever is running in the session.Extended
/v1/sessions/{session_id}/sharePOSTPublish a read-only shared view (optional).Full
/v1/sessions/{session_id}/shareGETFetch the shared view (optional).Full
/v1/traces/{session_id}DELETEDelete a session and its history; cancels any in-flight task first.Full

5. Files and artifacts

EndpointMethodPurposeClass
/v1/filesPOSTUpload a file (multipart/form-data) and reference it by id.Extended
/v1/sessions/{session_id}/filesGETList every artifact of a session, including earlier tasks.Extended
/v1/containers/{container_id}/files/{file_id}/contentGETDownload raw artifact bytes with the file's own media type.Extended
/v1/containers/{container_id}/files/{file_id}/pdfGETRendered PDF preview, if implemented (501/502 otherwise).Extended
/v1/sessions/{session_id}/files/archiveGETDownload all session artifacts as one archive.Extended

Object model

The surface above operates on six object types, each with an object field and a type-distinguishing id prefix: harness (chrn_), response (resp_), session (hsess), file (file_), container (cntr_), and streamed event objects. A response is one task; a session chains responses that share context and a working directory; a container holds a session's files.

Related pages

Read getting started, conformance, architecture, the specification guide, and HarnessRouter Community Edition.

Primary sources