Connector
A key made in the Keys tab works until the day ends. That is fine for a chat, but an editor such as Zed or an agent that runs for days would need a new key every morning. The connector removes that step. It is a small program that runs on your own computer, serves the same OpenAI API on a local address, and makes a fresh key for every request it forwards.
Set it up
- Download it. It is one file with no packages and needs Node.js 20 or newer.
curl -O https://paranoid.red/connect.mjs
- In the Keys tab, press Show my connector code, then run the connector and paste the code when it asks. The code is saved in
~/.paranoid/connector.json, readable only by you. It is asked for instead of typed on the command line, so it never lands in your shell history.
node connect.mjs
-
Back in the Keys tab, press I pasted it. Forget it in this browser. From now on the connector owns your questions.
-
Point your app at the connector. The API key can be any text, because the connector replaces it on every request.
Base URL http://127.0.0.1:4141/v1
API key anything
Later runs need no code: node connect.mjs picks up where it stopped. To use another port, set PARANOID_PORT.
What it does on each request
- It reads the model you asked for and its price in questions from
/api/v1/models. - It reads the public list of spent questions from
/api/v1/usedand moves its counter past anything another device spent. - It writes the new counter to disk before any proof exists, so a question is never offered twice, even after a crash.
- It proves those questions on your computer with a new random value, packs them into a key that is used for this one request only, and sends the request to the gateway.
- It streams the answer back to your app.
A proof takes about 0.3 to 0.4 seconds on a laptop (the first one after start takes a little longer). Because every request carries its own key, the gateway cannot tie two requests from your editor together, and the change of day never breaks anything.
What it downloads
On its first request the connector downloads the prover (/zk/snarkjs.min.js) and the circuit (/zk/request.wasm, /zk/request.zkey) from the site, the same files your browser uses, and keeps them in ~/.paranoid/zk. Their SHA-256 hashes are written inside connect.mjs, and it refuses to run anything that does not match.
Chain reads (the member list and the day) go through the site's relay at /api/rpc. To read from your own Solana RPC instead, set
PARANOID_RPC.
One place at a time
Your questions are numbered, and each number may be spent once. Spending the same number twice gives your secret away, and anyone can then slash the membership. The connector checks the public list before every key, so it never reuses a number another device already sent. A key that another device made but has not sent yet is invisible to it, which is why the Keys tab forgets the code once you move it and stops asking your wallet to unlock in that browser. Another browser where you connect the same wallet will still offer to unlock: stop the connector before you accept, and the same goes for pressing Unlock by hand.
Anyone who has the connector code can spend your questions. Keep it in the connector and nowhere else.