<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Morse</title>
    <description>The latest articles on DEV Community by Morse (@trymorse).</description>
    <link>https://dev.to/trymorse</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F99mvlsfu5tfj9m7ku25d.png</url>
      <title>DEV Community: Morse</title>
      <link>https://dev.to/trymorse</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/trymorse"/>
    <language>en</language>
    <item>
      <title>Private, OpenAI-compatible LLM APIs compared: zero retention, TEE and verifiable enclaves</title>
      <dc:creator>Morse</dc:creator>
      <pubDate>Sat, 21 Nov 2026 01:25:50 +0000</pubDate>
      <link>https://dev.to/trymorse/private-openai-compatible-llm-apis-compared-zero-retention-tee-and-verifiable-enclaves-2iln</link>
      <guid>https://dev.to/trymorse/private-openai-compatible-llm-apis-compared-zero-retention-tee-and-verifiable-enclaves-2iln</guid>
      <description>&lt;p&gt;&lt;em&gt;Every fact about each API comes from its own docs, linked inline, checked on November 20, 2026.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you send prompts to a hosted model, "private" can mean any of three different things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zero data retention (ZDR):&lt;/strong&gt; the provider promises, usually in a contract, not to store your prompts or replies. You're trusting a policy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TEE (trusted execution environment):&lt;/strong&gt; the model runs inside hardware-isolated memory (Intel TDX, AMD SEV-SNP, NVIDIA confidential-computing GPUs) that the operator can't read. You're trusting the chip maker's hardware.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;E2EE (end-to-end encryption):&lt;/strong&gt; your client encrypts the request to a key that only the enclave holds, so nothing between you and the enclave can read it. The useful question is &lt;em&gt;which&lt;/em&gt; enclave: a gateway's, or the one running the model.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Attestation&lt;/strong&gt; ties it together. It's a report signed by the hardware vendor that says what code an enclave is running, so you can check it against published source instead of taking the provider's word for it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The comparison
&lt;/h2&gt;

&lt;p&gt;Morse first (it's ours), then the others by type: routers, enclave hosts, gateways. This isn't a ranking.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;API&lt;/th&gt;
&lt;th&gt;OpenAI-compatible&lt;/th&gt;
&lt;th&gt;ZDR / no retention&lt;/th&gt;
&lt;th&gt;TEE&lt;/th&gt;
&lt;th&gt;E2EE&lt;/th&gt;
&lt;th&gt;Attestation you can check&lt;/th&gt;
&lt;th&gt;Models&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Morse (ours)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes, &lt;code&gt;private&lt;/code&gt; tier by contract; Morse's enclave keeps no prompt or reply&lt;/td&gt;
&lt;td&gt;Yes, &lt;code&gt;tee&lt;/code&gt; tier&lt;/td&gt;
&lt;td&gt;Yes, &lt;code&gt;e2ee&lt;/code&gt; tier, to the model's enclave&lt;/td&gt;
&lt;td&gt;Yes, &lt;code&gt;npx @askmorse/verify&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;87 open-weight models&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenRouter&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes, per request (&lt;code&gt;zdr: true&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Not described on its pages&lt;/td&gt;
&lt;td&gt;Not described&lt;/td&gt;
&lt;td&gt;Not described&lt;/td&gt;
&lt;td&gt;Open and proprietary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TrustedRouter&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes (prompt storage off)&lt;/td&gt;
&lt;td&gt;Gateway in a TEE; confidential routes via other hosts&lt;/td&gt;
&lt;td&gt;TLS ends inside the gateway's enclave&lt;/td&gt;
&lt;td&gt;Yes, image digest at &lt;code&gt;/attestation&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Open and proprietary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Phala / RedPill&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Gateway stores no bodies; &lt;code&gt;zdr: true&lt;/code&gt; upstream&lt;/td&gt;
&lt;td&gt;Yes (Intel TDX, NVIDIA H100/H200/B300)&lt;/td&gt;
&lt;td&gt;To the gateway&lt;/td&gt;
&lt;td&gt;Yes, &lt;code&gt;@phala/aci-verifier&lt;/code&gt;, dstack verifier&lt;/td&gt;
&lt;td&gt;Open and proprietary (proprietary outside the TEE)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NEAR AI Cloud&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;"No logs of prompts or responses"&lt;/td&gt;
&lt;td&gt;Yes (Intel TDX + NVIDIA H200)&lt;/td&gt;
&lt;td&gt;To the model's enclave&lt;/td&gt;
&lt;td&gt;Yes, open-source verifier + web page&lt;/td&gt;
&lt;td&gt;Open in TEE; GPT/Claude/Gemini outside it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tinfoil&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes (AMD SEV-SNP, Intel TDX, NVIDIA H100/H200/B200)&lt;/td&gt;
&lt;td&gt;To the model's enclave (TLS in enclave + EHBP)&lt;/td&gt;
&lt;td&gt;Yes, SDKs + &lt;code&gt;tinfoil attestation verify&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Open-weight only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prem&lt;/td&gt;
&lt;td&gt;Yes (gateway or local proxy)&lt;/td&gt;
&lt;td&gt;Yes, in ZDR mode&lt;/td&gt;
&lt;td&gt;Yes, in confidential mode (SEV-SNP/TDX + NVIDIA)&lt;/td&gt;
&lt;td&gt;Yes, in confidential mode (ML-KEM768 + X25519)&lt;/td&gt;
&lt;td&gt;Yes, Reticle verifier&lt;/td&gt;
&lt;td&gt;Open-weight only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Privatemode&lt;/td&gt;
&lt;td&gt;Yes (local proxy)&lt;/td&gt;
&lt;td&gt;Prompts not stored&lt;/td&gt;
&lt;td&gt;Yes (SEV-SNP, TDX, NVIDIA H100/B200)&lt;/td&gt;
&lt;td&gt;To the worker (HPKE)&lt;/td&gt;
&lt;td&gt;Yes, via the proxy; reference values public&lt;/td&gt;
&lt;td&gt;Open-weight only&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;"Not described" means we couldn't find it on that company's own pages. It doesn't mean the feature doesn't exist.&lt;/p&gt;

&lt;h2&gt;
  
  
  Provider notes
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Morse (ours).&lt;/strong&gt; One OpenAI-compatible endpoint for 80+ open-weight models, "called from Morse's attested enclave, which keeps no prompt or reply" (&lt;a href="https://trymorse.ai/inference/docs?src=seo-devto" rel="noopener noreferrer"&gt;docs&lt;/a&gt;). TLS terminates inside the enclave, and providers see Morse as the customer, so "your account, your card, and your IP address stop at Morse" (&lt;a href="https://trymorse.ai/inference?src=seo-devto" rel="noopener noreferrer"&gt;inference&lt;/a&gt;). You set a privacy floor per request: &lt;code&gt;private&lt;/code&gt; (providers bound by contract to keep nothing), &lt;code&gt;tee&lt;/code&gt; (the model runs in the provider's enclave) or &lt;code&gt;e2ee&lt;/code&gt; (encrypted to a key only the model's enclave holds). Morse "refuses a request it can't serve at that floor rather than sending it lower." The enclave code is &lt;a href="https://github.com/trymorse/morse-enclave" rel="noopener noreferrer"&gt;open source&lt;/a&gt;, and &lt;code&gt;npx @askmorse/verify inference.trymorse.ai&lt;/code&gt; checks the running release against it. Pricing is pay as you go, with no subscription.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OpenRouter.&lt;/strong&gt; One key for open and proprietary models. Its &lt;a href="https://openrouter.ai/docs/features/zdr" rel="noopener noreferrer"&gt;ZDR page&lt;/a&gt; defines ZDR as "no routine storage of prompts or responses after processing, apart from the CSAM exception," and you can require it per request with &lt;code&gt;"provider": {"zdr": true}&lt;/code&gt;. &lt;a href="https://openrouter.ai/docs/features/provider-routing" rel="noopener noreferrer"&gt;Provider routing&lt;/a&gt; also has &lt;code&gt;data_collection: "deny"&lt;/code&gt; ("use only providers which do not collect user data"). The ZDR page notes that self-serve accounts allow "Safety Retention" endpoints by default, so check your account settings.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TrustedRouter.&lt;/strong&gt; An OpenAI-compatible router at &lt;code&gt;api.trustedrouter.com/v1&lt;/code&gt; with a confidential-only host as well (&lt;a href="https://trustedrouter.com/docs" rel="noopener noreferrer"&gt;docs&lt;/a&gt;). Its &lt;a href="https://trustedrouter.com/trust" rel="noopener noreferrer"&gt;trust page&lt;/a&gt; says "Public TLS terminates inside the measured GCP Confidential Space workload," and you can compare the &lt;code&gt;image_digest&lt;/code&gt; from &lt;code&gt;/attestation&lt;/code&gt; with the published one. Per request you can set &lt;code&gt;"provider": {"min_privacy": "zdr"}&lt;/code&gt; or &lt;code&gt;"confidential"&lt;/code&gt;. The router code is &lt;a href="https://github.com/Lore-Hex/quill-router" rel="noopener noreferrer"&gt;open source&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Phala / RedPill.&lt;/strong&gt; RedPill's gateway runs in Intel TDX, and "the gateway does not store request or response bodies" (&lt;a href="https://docs.redpill.ai/confidential-ai/trust-boundary.md" rel="noopener noreferrer"&gt;trust boundary&lt;/a&gt;). Its E2EE "is decrypted inside the attested gateway" (&lt;a href="https://docs.redpill.ai/confidential-ai/e2e-encryption.md" rel="noopener noreferrer"&gt;E2EE docs&lt;/a&gt;). GPU-TEE models run on H100, H200 and B300 (&lt;a href="https://phala.com/confidential-ai" rel="noopener noreferrer"&gt;Phala&lt;/a&gt;). Proprietary models run on providers that aren't attested, so check &lt;code&gt;is_tee&lt;/code&gt; per model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NEAR AI Cloud.&lt;/strong&gt; It runs on "Intel TDX + NVIDIA GPU TEE" (&lt;a href="https://near.ai" rel="noopener noreferrer"&gt;near.ai&lt;/a&gt;). Its E2EE goes all the way to the model: "Only model environments holding the attested model key can decrypt your messages" (&lt;a href="https://docs.near.ai/cloud/guides/e2ee-chat-completions.md" rel="noopener noreferrer"&gt;E2EE guide&lt;/a&gt;). OpenAI, Anthropic and Gemini models are offered in an "Incognito" mode that runs "outside a TEE" (&lt;a href="https://docs.near.ai/cloud/models.md" rel="noopener noreferrer"&gt;models&lt;/a&gt;). The verifier is &lt;a href="https://github.com/nearai/nearai-cloud-verifier" rel="noopener noreferrer"&gt;open source&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tinfoil.&lt;/strong&gt; Open-weight models only, at &lt;code&gt;inference.tinfoil.sh/v1&lt;/code&gt;. "We do not retain prompt or response content after the response is returned" (&lt;a href="https://tinfoil.sh/privacy" rel="noopener noreferrer"&gt;privacy&lt;/a&gt;). TLS terminates inside the confidential VM, and its &lt;a href="https://docs.tinfoil.sh/resources/ehbp.md" rel="noopener noreferrer"&gt;EHBP protocol&lt;/a&gt; "encrypts HTTP message bodies end-to-end." Its SDKs verify attestation for you. Tinfoil &lt;a href="https://docs.tinfoil.sh/sdk/direct-api-access.md" rel="noopener noreferrer"&gt;notes&lt;/a&gt; that plain OpenAI-SDK calls skip that check and are "not recommended for production."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prem.&lt;/strong&gt; Two modes. ZDR mode (&lt;code&gt;gateway.prem.io/openai&lt;/code&gt;) is contract-based: "Nobody keeps your prompts, completions, or audio content at any stage of the request" (&lt;a href="https://docs.prem.io/zdr/overview.md" rel="noopener noreferrer"&gt;ZDR&lt;/a&gt;). Confidential mode runs through a local proxy: "The SDK or local proxy encrypts the request payload before network egress" (&lt;a href="https://docs.prem.io/security-model.md" rel="noopener noreferrer"&gt;security model&lt;/a&gt;), and the Reticle verifier checks the CPU and every GPU.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Privatemode.&lt;/strong&gt; Built by Edgeless Systems. It's "compatible with the OpenAI and Anthropic APIs" through a local proxy (&lt;a href="https://docs.privatemode.ai" rel="noopener noreferrer"&gt;docs&lt;/a&gt;). "Prompts are encrypted by the client-side Privatemode proxy and decrypted by a server-side" proxy on the worker (&lt;a href="https://docs.privatemode.ai/security/encryption/" rel="noopener noreferrer"&gt;encryption&lt;/a&gt;). It also says "the reference values in the manifest can be derived by anyone" (&lt;a href="https://docs.privatemode.ai/security/attestation/overview/" rel="noopener noreferrer"&gt;attestation&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Switching is a base-URL change
&lt;/h2&gt;

&lt;p&gt;All eight speak the Chat Completions format, so the OpenAI SDK you already use keeps working. Here's the Morse version, with a privacy floor on one request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://inference.trymorse.ai/v1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="c1"&gt;# was https://api.openai.com/v1&lt;/span&gt;
    &lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"MORSE_API_KEY"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;           &lt;span class="c1"&gt;# was OPENAI_API_KEY&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;reply&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"z-ai/glm-5.3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"user"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"content"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Summarise this contract clause."&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;extra_body&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"provider"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"min_privacy"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"tee"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# only attested hardware may serve it&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same pattern works for the others: swap &lt;code&gt;base_url&lt;/code&gt;, the key and the model id, and move any routing options into &lt;code&gt;extra_body&lt;/code&gt; (for OpenRouter, &lt;code&gt;{"provider": {"zdr": True}}&lt;/code&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  How to choose
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;You need GPT or Claude:&lt;/strong&gt; OpenRouter, TrustedRouter, Phala/RedPill and NEAR AI route to proprietary models. There, privacy comes from ZDR terms, not an enclave.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You want the model itself in attested hardware:&lt;/strong&gt; Morse's &lt;code&gt;tee&lt;/code&gt; and &lt;code&gt;e2ee&lt;/code&gt; tiers, Tinfoil, NEAR AI, Prem (confidential mode), Privatemode and Phala's GPU-TEE models.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You want encryption that ends at the model, not at a gateway:&lt;/strong&gt; Morse's &lt;code&gt;e2ee&lt;/code&gt; tier, NEAR AI, Tinfoil, Prem and Privatemode.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whatever you pick, run the provider's verifier in CI rather than once by hand. That turns a privacy claim into a check that can fail.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Is zero data retention the same as a TEE?&lt;/strong&gt;&lt;br&gt;
No. ZDR is a promise not to store your data, usually backed by a contract. A TEE is hardware that stops the operator from reading memory while your request runs, and attestation lets you check which code is running.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I keep using the OpenAI SDK?&lt;/strong&gt;&lt;br&gt;
Yes, with all eight. You change the base URL, the key and the model id. Prem and Privatemode can also run a local proxy that you point the SDK at.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What does "attestation you can check" mean in practice?&lt;/strong&gt;&lt;br&gt;
A command or library fetches the enclave's hardware-signed report and compares its code measurement with a published build. Examples: &lt;code&gt;npx @askmorse/verify&lt;/code&gt;, &lt;code&gt;tinfoil attestation verify&lt;/code&gt;, &lt;code&gt;@phala/aci-verifier&lt;/code&gt;, NEAR AI's verifier and Prem's Reticle.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does E2EE mean the provider can't see my prompt?&lt;/strong&gt;&lt;br&gt;
It depends on where the encryption ends. On RedPill it ends at the attested gateway. On Morse's &lt;code&gt;e2ee&lt;/code&gt; tier, NEAR AI, Tinfoil, Prem's confidential mode and Privatemode, it ends inside the enclave that runs the model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which of these offer GPT and Claude?&lt;/strong&gt;&lt;br&gt;
OpenRouter, TrustedRouter, Phala/RedPill and NEAR AI. Morse's API, Tinfoil, Prem and Privatemode serve open-weight models such as DeepSeek, GLM, Kimi, Qwen and gpt-oss.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I make sure a request is never served at a lower privacy level?&lt;/strong&gt;&lt;br&gt;
Set the floor on the request. Morse and TrustedRouter have &lt;code&gt;provider.min_privacy&lt;/code&gt;, OpenRouter has &lt;code&gt;provider.zdr&lt;/code&gt;, and RedPill has &lt;code&gt;provider.zdr&lt;/code&gt;, which fails closed with a 404.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How does Morse's API price requests?&lt;/strong&gt;&lt;br&gt;
Pay as you go, with no subscription. Each model's price per million tokens is listed on the &lt;a href="https://trymorse.ai/inference/models?src=seo-devto" rel="noopener noreferrer"&gt;models page&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>privacy</category>
      <category>openai</category>
    </item>
    <item>
      <title>Private LLM inference with the OpenAI SDK: change two lines, then pick a privacy floor</title>
      <dc:creator>Morse</dc:creator>
      <pubDate>Thu, 19 Nov 2026 09:02:24 +0000</pubDate>
      <link>https://dev.to/trymorse/private-llm-inference-with-the-openai-sdk-change-two-lines-then-pick-a-privacy-floor-2fm5</link>
      <guid>https://dev.to/trymorse/private-llm-inference-with-the-openai-sdk-change-two-lines-then-pick-a-privacy-floor-2fm5</guid>
      <description>&lt;p&gt;If you call open-weight models (Kimi, GLM, DeepSeek, Qwen) through a hosted API, your prompts pass through at least one company you didn't pick. This post shows how to send them to Morse's API instead, and how to say per request how private the call has to be.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Point the OpenAI SDK at Morse
&lt;/h2&gt;

&lt;p&gt;Morse speaks the OpenAI Chat Completions format, so the SDK you already use works. Two lines change: the base URL and the key.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://inference.trymorse.ai/v1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"MORSE_API_KEY"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;reply&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"moonshotai/kimi-k3.1-pro"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"user"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"content"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Hello"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keys start with &lt;code&gt;sk_morse_&lt;/code&gt; and come from the console (trymorse.ai/inference → Get API key). Billing is pay-as-you-go. Keep the key on a server; anyone who reads it can spend your credits.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. List the models instead of hard-coding them
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s https://inference.trymorse.ai/v1/models \
  -H &lt;span class="s2"&gt;"Authorization: Bearer $MORSE_API_KEY"&lt;/span&gt; \
  &lt;span class="o"&gt;|&lt;/span&gt; jq -r &lt;span class="s1"&gt;'.data[] | select(.type == "chat") | .id'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each model lists the privacy tiers it's sold at, with the context size and price for each.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Set a privacy floor per request
&lt;/h2&gt;

&lt;p&gt;There are three tiers, least to most private:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;private&lt;/strong&gt;: the provider runs the model under a zero-data-retention contract.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;tee&lt;/strong&gt;: the model runs in a hardware enclave whose attestation Morse checks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;e2ee&lt;/strong&gt;: your client encrypts each message to the enclave's key.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ask for a minimum with the &lt;code&gt;provider&lt;/code&gt; field (Morse doesn't forward it to the model host):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"z-ai/glm-5.3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;extra_body&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"provider"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"min_privacy"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"tee"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If no endpoint can meet the floor, you get &lt;code&gt;400 privacy_floor_unmet&lt;/code&gt;; the request is never sent at a lower tier. The &lt;code&gt;X-Tier&lt;/code&gt; response header tells you which tier served it.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Check the enclave yourself
&lt;/h2&gt;

&lt;p&gt;Morse's enclave code is open source (github.com/trymorse/morse-enclave), and releases build to the same bytes. One command checks that the running enclave is that release, on hardware Morse can't read:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @askmorse/verify
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What else carries over
&lt;/h2&gt;

&lt;p&gt;Streaming, tool calling and &lt;code&gt;reasoning_effort&lt;/code&gt; work as in the OpenAI SDK. Coming from OpenRouter, the base URL, key and model id change; &lt;code&gt;provider.min_privacy&lt;/code&gt;, &lt;code&gt;zdr&lt;/code&gt; and &lt;code&gt;max_price&lt;/code&gt; carry over.&lt;/p&gt;

&lt;p&gt;Docs: &lt;a href="https://trymorse.ai/inference/docs" rel="noopener noreferrer"&gt;https://trymorse.ai/inference/docs&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>privacy</category>
      <category>openai</category>
    </item>
  </channel>
</rss>
