The free door
Between the moment a call is approved and the moment it runs, three things can change without leaving a trace: the instruction, which model answers it, and whether the same approval gets used twice. A receipt makes each of those visible after the fact.
Here is the part people expect to be hard. It is one file. You run it. Your call still goes to your provider, with your key, from your machine. We are not in the middle, so we cannot hold your data and we cannot see your prompts.
Save the file below and run it. It listens on port 8402 and forwards to whatever upstream you set.
Change one line in your client. Set the base URL to http://127.0.0.1:8402. Nothing else in your code changes.
Every response comes back with an X-Hive-Receipt header and a line appended to receipts.jsonl. Paste any of them at the verifier and your own browser checks the signature.
hive_sidecar.py
# hive_sidecar.py , one file, no Hive dependency, MIT. # Run it next to your app. Point your OpenAI client at it. # It forwards your call unchanged and writes a receipt per call. import json, hashlib, os, urllib.request from http.server import BaseHTTPRequestHandler, HTTPServer UPSTREAM = os.environ.get("UPSTREAM", "https://hivecompute-g2g7.onrender.com/v1/compute/chat/completions") SIGNER = "https://signer.thehiveryiq.com/sign" def canon(o): # the bytes that get signed, sorted and compact return json.dumps(o, sort_keys=True, separators=(",", ":")) def sha(b): return hashlib.sha256(b if isinstance(b, bytes) else b.encode()).hexdigest() def post(url, obj, hdrs=None): req = urllib.request.Request(url, data=canon(obj).encode(), headers={"Content-Type": "application/json", **(hdrs or {})}) return json.loads(urllib.request.urlopen(req, timeout=60).read()) class H(BaseHTTPRequestHandler): def do_POST(self): body = json.loads(self.rfile.read(int(self.headers["Content-Length"]))) auth = {"Authorization": self.headers.get("Authorization", "")} out = post(UPSTREAM, body, auth) record = { "v": "hive.custody.v1", "asked_digest": sha(canon(body)), # what was asked "requested_model": body.get("model"), # what was requested "served_model": out.get("model"), # what actually answered "arrived_digest": sha(canon(out)), # what arrived "served_at": out.get("created"), # and when } env = post(SIGNER, {"text": canon(record)}) sig = env.get("envelope", {}).get("envelope_signature", "") raw = json.dumps(out).encode() self.send_response(200) self.send_header("Content-Type", "application/json") self.send_header("X-Hive-Receipt", sha(canon(record))) self.send_header("X-Hive-Signature-Scheme", env.get("algorithm", "ML-DSA-65")) self.send_header("Content-Length", str(len(raw))) self.end_headers() self.wfile.write(raw) open("receipts.jsonl", "a").write(canon({**record, "signature": sig}) + "\n") HTTPServer(("127.0.0.1", 8402), H).serve_forever()
Python standard library only. No Hive package to install, nothing to sign up for, and you can read every line of it before you run it. The only outbound call it adds is the signing request, and the only thing that request carries is the digest record you see above.
This signs a real record with the production signer and asks the countersigner to add a second signature over it. Real keys, real signatures, nothing simulated.
A Hive receipt proves what was asked, what was decided, what arrived, what was served, and when. It makes forgery expensive and discoverable. It does not tell you the answer was correct. Nothing on this page claims otherwise.
The countersigner holds a separate key and keeps a separate clock and log from the serving side, which removes self-dated records and undetected conflicting records. It is operated by Hive, so it is not an independent party today and its own health endpoint reports independent false. Its log sits on ephemeral storage and does not survive a redeploy, so treat it as append only within a process lifetime. It signs Ed25519, which is not post quantum. Production receipts are signed ML-DSA-65 under NIST FIPS 204.
A sidecar you run yourself can see the request and the response. It cannot see inside your provider's scheduler, it cannot observe which resident weights answered, and it cannot watch the admission window. Those stages are carried by name as absent rather than quietly dropped, so a receipt from a full deployment and a receipt from this file are told apart by anyone reading them.
Patent pending. Verification is free and needs no account.