Skip to main content

Base URL and transports

https://api.runmirrors.com. Three doors:
  • tRPC at /trpc/<verb>: the web app and the CLI; queries for reads (GET with ?input=), mutations for writes (POST with a JSON body). Every procedure is a verb from the registry.
  • Plain HTTP routes for what is not a verb: collect, the tool plane, the multipart build, uploads, webhooks, OAuth discovery, health.
  • MCP at /mcp (the MCP server).
GET /api/registry returns every verb definition and each verb’s real input as JSON Schema; the CLI derives its commands from it.

Authentication

Authorization: Bearer <credential>: a workspace key (mk_live_), a session token (ms_, session routes only), an MCP access token (mcp_at_), or the web session’s JWT. See API keys.

Errors

Every error answers with one JSON envelope:
Quota errors add meter (which meter, used and limit) and cardWouldLift (whether a card on file would lift it); access errors add access (pending or denied). tRPC carries the same envelope under error.data.envelope with the HTTP status in error.data.httpStatus.

Rate limits and sizes

Collect batches are capped by bytes per request and by collected bytes per mirror; uploads by bytes per file; the contact form and the collect route by address. Long operations (a build, a twin start) answer with an id to poll rather than holding the connection.

Versioning

The API is unversioned; verbs are added, never changed in place. The registry is the record of what exists.