const ai = createSecureOpenAI({ /* ... */ });
const stream = ai.chat.completions.stream({
messages,
});
// prompts and streamed tokens are E2E-encrypted from the
// browser to YOUR backend — their edge, CDN, logs, and
// proxies see only ciphertext.Drop-in shapes mirroring the official SDKs — createSecureOpenAI and createSecureAnthropic — built on the same transport-agnostic core as nenFetch and nenStream.
What this honestly protects (and what it doesn't)
This is the claim most easily overstated, so we pin it down. Read this section before you read the marketing.
The honest pitch: “Your users' prompts never appear in plaintext anywhere across your own stack — your edge, your logs, your proxies, your vendors-in-the-middle — only inside the one service you trust to call the model.”
For teams that also need to hide prompts from the provider, the self-host / TEE path is a separate, later capability — never an implied default.
Why AI is the wedge
- AI apps already stream sensitive data — prompts, PHI, legal context, financial records — through many hops of your own infrastructure.
- Health, legal, and fintech AI companies feel this pain today and carry budget and compliance urgency.
- Secure streaming is a rare, defensible niche — most PQC projects stop at request/response. nenStream already does chunked, authenticated SSE.
Live demo
Pick a scenario, hit Send encrypted, and watch the split view: your app sees decrypted tokens streaming in on the left; the wire — your CDN, edge, and logs — sees only base64 ciphertext frames on the right.