Files
ppq-private-mode-startos/instructions.md
T
helix-nine 8397c7b1eb adopt 0.4's persistent key store and browser setup form
The earlier bump took 0.4.1 for its model catalog and status page but
left PPQ_DATA_DIR unset, which disabled the key form the release exists
to add. Enable it, and let the proxy own the key outright.

PPQ_API_KEY is no longer passed. The volume's `proxy/` subpath mounts at
/data as PPQ_DATA_DIR, so upstream's key store is the single source of
truth: the Status Page and the Configure PPQ API Key action write the
same config.json, and there is no StartOS-side copy to revert what the
browser saved. A chown oneshot hands /data to the image's `node` user so
the page can write there.

Verbose Logging moves to store.json outside the mount, because upstream
rewrites config.json wholesale when a key is saved and would drop it.

main.ts watches config.json — upstream loads it once at startup, so the
watch is what makes the action take effect: the write restarts the
daemon, which reloads the file. A key saved on the page applies
immediately and converges through the same restart.

The task drops from critical to important. A critical task suspends
every other control, so it would have left the user unable to start the
service and reach the page's own form — and with PPQ_DATA_DIR set the
proxy no longer exits keyless; it attests, serves the page, and answers
401 until a key exists. main.ts clears the task when a key appears,
since saving on the page never touches the action that would clear it.

The action's key field is now validated against upstream's own
^sk-[A-Za-z0-9]{16,64}$ shape and no longer refuses a blank submission,
a key having become optional.
2026-08-12 09:58:35 -06:00

79 lines
2.9 KiB
Markdown

# PPQ Private Mode
## Documentation
- [Upstream proxy documentation](https://github.com/PayPerQ/ppq-private-mode-proxy) — endpoints, client examples, and how the encryption works
- [PPQ.AI API docs](https://ppq.ai/api-docs) — creating an API key and funding your account
## What you get on StartOS
A local endpoint your AI clients talk to instead of talking to a model provider
directly. Everything sent through it is encrypted on your server and only
decrypted inside an attested hardware enclave, so neither PPQ.AI nor the model
host can read your queries.
Two interfaces share one address:
- **Status Page** — a web page showing whether enclave attestation succeeded,
which private models are available, and how to point a client at the proxy.
It is also where you can save your API key.
- **OpenAI-Compatible API** — the same address, ready to copy into a client.
The only thing the service stores is your PPQ.AI API key and the logging
setting.
## Getting set up
You need a funded API key from [ppq.ai](https://ppq.ai) — create one under
**Settings → API Keys**, since usage is billed per query to that key. You can
save it before or after starting the service; the proxy runs either way and
simply refuses inference requests until it has one.
1. Start the service. It performs a cryptographic attestation of the remote
enclave, which the health check reports as ready — usually within a few
seconds.
2. Open the **Status Page**, confirm attestation says _verified_, and paste your
key into the API key form. The proxy picks it up immediately, then restarts
once to persist it.
3. Copy the **OpenAI-Compatible API** address to point a client at it.
If you would rather not start the service first, run the **Configure PPQ API
Key** action instead of step 2 — it does the same thing from the Actions tab.
## Using PPQ Private Mode
### Connecting a client
Point any OpenAI-compatible client at the API address:
```
POST <api-address>/v1/chat/completions
{"model": "private/glm-5-2", "messages": [{"role": "user", "content": "Hello"}]}
```
Anthropic-SDK clients (including Claude Code) can use the native endpoint at
`<api-address>/v1/messages`. For Claude Code, set:
```
export ANTHROPIC_BASE_URL="<api-address>"
export ANTHROPIC_MODEL="private/glm-5-2"
```
`GET <api-address>/v1/models` lists the available private models, and the Status
Page shows the same list.
Requests are billed to your saved API key by default. To bill a different
PPQ.AI key per request, pass it as an `Authorization: Bearer` header.
### Replacing the key
Either surface works, and both write the same place: **Replace key** on the
Status Page, or the **Configure PPQ API Key** action. The action is also where
you turn Verbose Logging on and off; leaving its key field blank keeps the key
you already saved.
## Limitations
Backups of this service include your saved API key, and restoring a backup
restores it — keep that in mind when handling backup drives.