— API Reference —

THE REAL HTTP API

Runs as a local/self-hosted process on :4477 -- not a hosted multi-tenant service. Every field name below is copied from the actual request/response structs, not reconstructed from memory.

GET/healthz

Liveness check, used by zk-ci.yml before deploying anything to a fresh server.

No body. Returns 200 once the server is ready to accept requests.

POST/v1/proofs

"Push code, get a proof" -- the whole "no circuits, no prover clusters" pitch, for the one real backend.

Request:

{ "program": "INIT 5\nADD 3\nMUL 2\nSUB 4" }

Response:

{
  "initial": "5",
  "result": "24",
  "proof_bytes": 11234,
  "proof_base64": "..."
}

Rejects anything over the 2,000-instruction cap -- see Features for why that number specifically.

POST/v1/verify

Re-executes program locally (cheap) to know what to check proof_base64 against, then verifies.

Request:

{ "program": "INIT 5\n...", "proof_base64": "..." }

Response:

{ "valid": true, "result": "24", "error": null }

Deliberately doesn't require anything from the /v1/proofs response other than the proof bytes -- the program itself is the only shared trust anchor.

GET/v1/backends

Lists what is actually registered, so "multi-VM" is checkable rather than asserted.

{ "backends": ["stark", "mock-echo"], "default": "stark" }

mock-echo is a routing stub -- its verify always errors, never reports valid: true.

POST/v1/backends/{name}/proofs

The router-dispatched equivalent of /v1/proofs, generalized to whichever backend {name} names.

Same request shape as /v1/proofs. A 404 if {name} isn't registered.

POST/v1/backends/{name}/verify

The router-dispatched equivalent of /v1/verify.

Request:

{ "program": "...", "bytes_base64": "..." }

Response:

{ "valid": false, "error": "mock-echo cannot verify anything" }
Hardening applied to all routes: 1 MB body limit, 60s timeout, 4 concurrent requests max. Full source: crates/zkvm-host-server/src/lib.rs. Design rationale: docs/HOST_SERVICE.md.