Every Seed site (hyper.media, dev.hyper.media or a self-hosted domain) serves the same HTTP read API. Seed Exact reads documents, accounts, listings and comments from it without authentication. This page lists exactly what the app uses; it is not a full reference of the API. Writes are covered in Publishing signed blobs.
Which server
The base URL is the root contract's persisted server state, default https://hyper.media, chosen in Me. A document opened by a typed web address is read from that address's origin instead (Open a site by URL). The net.fetch https: grant in app.ts allows any HTTPS host (Grants and capabilities).
Request and response format
GET {server}/api/{Key}?{params}, built by apiUrl. String, number and boolean parameters are written as is; objects and arrays are JSON-encoded into the query string.
Header Accept: application/json. Deadline 15 s (exactTimeout: 15000).
The body is a superjson envelope {json, meta}. The app decodes it with its own decodeEnvelope, which supports dates, bigint, undefined, special numbers and Uint8Array, and rejects anything else.
/hm/api/config answers plain JSON.
Endpoints
Endpoint | Parameters | Fields the app reads | Callers |
|---|---|---|---|
| none |
|
|
|
|
| |
|
|
| |
|
|
|
|
|
|
| child lists and author documents ( |
|
|
| |
|
|
| |
|
|
| |
|
| image bytes |
|
| none | raw file |
|
Shapes worth knowing
Document (Resource with type: "document"): content (block nodes), metadata {name, summary, icon, cover}, authors (uids), updateTime, version (head CIDs joined with dots), and for profile publishing account, path, genesis, generationInfo.generation.
Redirect: redirectTarget is an hm URL string or an object with id. The reader follows up to 10 hops.
Document info (Query and QueryBlock results): id {uid, path, id}, path, metadata {name, summary, cover, icon}, updateTime, authors, visibility, firstImageInContent, activitySummary.commentCount. Private results (visibility of 2, PRIVATE or RESOURCE_VISIBILITY_PRIVATE) are dropped by the app.
Comment: id (author/tsid), version, author, targetAccount, targetPath, replyParent, threadRoot, threadRootVersion, content, createTime, visibility. See Discuss: threading logic.
targetId for ListComments: {id, uid, path, version: null, blockRef: null, blockRange: null, hostname: null, scheme: null, latest: true}, in that key order.
Times arrive as ISO strings, Date (through superjson), numbers or {seconds, nanos}; the app accepts all four.
Error handling
client.ts maps failures to three messages: Couldn't reach the server., The server answered {status}. and The server sent something unreadable. Loaders turn them into pages with an error field and a Retry button, and never cache a failure. There is no automatic retry.
The Me package does not use this client. It calls /api/Account (8 s deadline) and /hm/api/config (10 s deadline) through its own helper (src/me/sources.ts L64, L125).
In tests
Contract tests for read and discuss call the live https://hyper.media read-only; write tests use https://dev.hyper.media (Contract UI tests).
The local test server on http://127.0.0.1:4790 forwards GET /hm/โฆ and GET /api/โฆ to https://hyper.media, answers /hm/api/config from the mock notify service, and never proxies notify paths.
Bun tests mock fetch and replay captured answers from src/read/__tests__/fixtures/ and src/discuss/__tests__/hypermedia-home-comments.json (Bun unit tests).
Known limits
No paging on Query, QueryBlock (capped client-side at the block's limit or 50) or ListComments.
No search endpoint is used. The directory search filters titles on the device.
The read, discuss and profile loaders do not verify signatures of what they read; they trust the chosen server.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime