{
  "id": 18531746,
  "title": "Your Demo Server Should Never Hold the Model Key",
  "url": "https://urgent.news/2026/11/06/your-demo-server-should-never-hold-the-model-key",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-06T17:10:35.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/devrs_886/your-demo-server-should-never-hold-the-model-key-2b9o"
  },
  "original_language": "en",
  "account": "Free demo services often provide a model and server options for free, which can be tempting for creators looking to showcase their work. However, this approach can be risky as it combines two different trust relationships into one process. The first boundary is between the public internet and your demo, where anonymous users can send requests. The second boundary is between your demo and the model provider, which handles your credential, prompt text, and request volume. When both boundaries are in the same container, a mistake in one can compromise the other. To mitigate this risk, it's recommended to separate the key from the public server. The key should live in a controlled process, while the server only holds a token that expires. The provider key should be stored in its own process and communicated via a separate token that can only reach the broker, which answers with text and usage counts instead of headers or tracebacks. This approach ensures that even if the demo leaks, the leaked information is worth a token that dies quickly and can only reach the broker, which doesn't have direct internet access.",
  "summary": "A public demo needs a model, but it does not need the credential that pays for it. When free model access and a free server option push the cost of shipping a demo close to zero, the cheapest possible architecture also becomes the riskiest one: paste the provider key into the host's environment variables, forget about it, and hope nobody looks. I want to walk you through a different arrangement,…",
  "key_points": [
    "Demo server should not hold model key",
    "Key should live in controlled process",
    "Server holds token that expires"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}