End-to-end encryption

End-to-end encryption protects every request between your code and your worker. Pendra passes the request on but has no key to read it.

End-to-end encryption is on the Pro and Enterprise plans. See pricing.

Turn it on

Set private_inference when you create the client. The SDK encrypts each request and decrypts each reply for you, so the rest of your code stays the same. To turn it on without changing code, set PENDRA_PRIVATE_INFERENCE=1.

from pendra import Pendra

client = Pendra(api_key="pdr_sk_...", private_inference=True)

response = client.chat.completions.create(
    model="qwen3.6:27b",
    messages=[{"role": "user", "content": "Summarise this contract."}],
)
print(response.choices[0].message.content)

Use version 0.15.1 or later of either SDK. If a request fails with unsupported envelope version, update the worker named in the error.

What Pendra can and can't see

Pendra can't see
  • Prompts and replies
  • Images, audio and files you send
  • Text you turn into speech, and the audio
  • Tool arguments
Pendra can see
  • Which model you used
  • Request sizes, timing and token counts
  • The length and format of audio you transcribe or generate
  • Content filtering results, if you turn it on

Pendra can't change a reply either. Your client rejects any reply that your worker didn't write. Workers never save private requests to disk.

Your encryption key

  • Your first worker creates the key, and each new worker is given it automatically, including GPUs you rent. There's nothing to set up.
  • Workers keep the key in memory and never write it to disk.
  • Restarting or replacing workers one at a time keeps the key. If every worker disconnects at once, the key is gone and the next worker creates a new one.
  • To choose which machines get the key, turn on worker approval.

Require encryption

Turn on Require E2E under Settings → Encryption to reject every request in your organisation that isn't end-to-end encrypted. First make sure every worker you rely on has a key, because a worker without one gets no requests while this is on.

Live microphone transcription isn't end-to-end encrypted, so it's turned off while this is on. To transcribe, upload a recording instead.

Check the key is yours

Compare the fingerprint on the Encryption page with the one pendra status shows on one of your workers. Then pin it, so your client refuses to send anything if the key ever changes.

# Paste the full 64-character fingerprint. To pin several keys,
# separate them with commas.
client = Pendra(
    api_key="pdr_sk_...",
    private_inference={"pinned_fingerprint": "a7f3c0d2...e9c21"},
)

Only pin if at least one worker is always running. If yours all stop regularly, for example rented GPUs you release, each restart makes a new key and a pinned client stops until you update the pin.

Rotate a key

Only owners can rotate or retire a key.

  1. Choose Rotate key on the Encryption page. Your workers get a second key, and nothing stops working.
  2. Give any pinned clients the new fingerprint.
  3. Choose Retire beside the old fingerprint and confirm. Every worker drops it from memory, and each worker's Activity tab shows when. A retired key can't be brought back.

Do the same if a key is ever exposed. Pendra stores none of your content, so there's nothing on our side to leak.

Good to know

  • The Playground encrypts automatically whenever a worker with a key serves the model, and marks each reply Encrypted or Not encrypted. With Require E2E on, it warns you before sending anything that would be rejected.
  • The Usage page shows which key encrypted each request.
  • With web tools on, a worker's web searches go through Pendra without end-to-end encryption, so Pendra and the search provider can see the query. Page fetches go straight from your worker. Leave web tools off on workers that need full privacy.
  • Content filtering works on encrypted requests. One of your workers runs the check, and Pendra only learns the result and the categories.

Technical details

For security reviews, here's what happens on the wire.

  • Cipher suite. HPKE (RFC 9180) in base mode, with DHKEM(X25519, HKDF-SHA256), HKDF-SHA256 and ChaCha20-Poly1305.
  • Keys. X25519, held in worker memory only. A fingerprint is the lowercase hex SHA-256 of the 32-byte public key. An organisation can hold up to 3 keys.
  • Requests. A fresh 32-byte key encrypts the whole request body with ChaCha20-Poly1305. That key is sealed with HPKE (info = "pendra-pi-v1") to each of your organisation's public keys. The model, stream flag and request type are bound in as additional authenticated data, so a request can't be rerouted unnoticed.
  • Replies. Encrypted under a key exported from the request's HPKE context (Export("pendra-pi-v1:rdek", 32)), so only a worker holding your private key can write a reply your client accepts. Your client stores no secret of its own. Streamed chunks use a counter nonce, so they can't be reordered or replayed, and an encrypted end-of-stream marker shows if a stream was cut short.
  • Key delivery. When a worker joins, an existing worker seals the key to the new worker's public key and Pendra passes it on. Pendra can't read it, but it does tell the existing worker which public key to use, so a dishonest Pendra could slip in a key of its own, and pinning wouldn't catch it. If that matters to you, keep a fixed set of workers with at least one always running, so the key is never sent again, and pin it.