LLM applications introduce risks that classic services don't: prompt injection, PII leakage, harmful content, runaway cost, and unmanaged sprawl. Security & governance means enforcing guardrails at the gateway - in Infere, the Protection settings on a key - before a request ever reaches a model.

Threat #1: Prompt injection

Prompt injection tricks a model into overriding its instructions. Defenses include input sanitization, injection-detection evaluators, and a gateway check before the model is called. Infere's attack check has three settings: Off, Monitor, and Block. Monitor answers the request and flags it in Logs, so you can calibrate on real traffic; Block refuses it with 403. A signal fires when blocked or flagged requests pass 20 in an hour on a key with the attack check on.

Protections on a key in the Infere app. Attack check, personal data, blocklist and content moderation settings, with what each blocked or redacted in 7 days. Example data.

Threat #2: PII & data leakage

Requests and responses can carry Social Security numbers, emails, phone numbers, and more. Infere's Personal data setting has three options: Allow (not checked), Redact, and Block. Redact replaces the data with placeholders before the model sees it and redacts the response too - which means a redacted response arrives in one piece, not streamed. Block refuses the request with 403.

Data residency is a separate setting: pick US, EU, UK, CA, AU, JP, SG or BR on the key, and a model with no endpoint in those regions returns 503 rather than leaving the region.

Threat #3: Harmful content

Content moderation works per category: block refuses the request with 403 before the model is called, and flag lets it through and marks it in Logs. Any category you switch on adds one check-model call per request, so moderation has a price of its own - Cost and usage shows protection checks separately from model requests.

Governance: budgets, keys, and access

  • Budgets - per key, in dollars per day, week or month, with an 80% warning email to the owner; at the budget, requests get 402 until the period resets.
  • Keys - each key carries its own model access (allowed and excluded models), budget, limits, protection settings and IP allowlist, and the workspace's API IP allowlist bounds every key.
  • Workspaces and projects - projects group keys, and roles are Owner, Admin, Member and Viewer; only an owner can buy credit or delete the workspace.
  • Accounts - two-factor authentication, trusted devices with each device's last sign-in and Remove, and a session timeout for your own sign-in.
  • Audit log - every change in the workspace, with who, what and the change before and after, filterable and exportable. Logs keeps every request, refused ones included, for 90 days, and a full export of requests or runs runs in the background from Settings.

Enforcement at the gateway

The strongest pattern is gateway enforcement: key status, credit, budgets, IP allowlists, model access and limit checks run before a model provider is called - so a refused request never reaches a provider and costs nothing. The Logs request panel shows that split per request: sign-in, key lookup, the protections that ran, the provider's first byte, streaming, and other.

# Protection, per key - step 5 of the eight-step key form

attack check        Off | Monitor (answered and flagged in Logs) | Block (403)

personal data       Allow | Redact (placeholders both ways, response not streamed) | Block (403)

blocklist           terms that refuse with 403; the model is not called and the request costs nothing

content moderation  per category: block (403 before the model is called) or flag

data residency      US | EU | UK | CA | AU | JP | SG | BR; no endpoint there gets 503

compliance          none by default; Change to set it
Security for LLM apps isn't a model problem - it's an architecture problem you solve at the gateway.

Next steps

Infere applies these controls on the key, backs them with an audit log and 90 days of request logs, and lets evaluators score responses for prompt injection and personal data after the fact. Govern AI use across teams without slowing them down.

Governance also means controlling spend - our true cost of agentic coding guide covers budget caps and cost attribution across teams using agentic tools.

Secure & govern your AI usage

Protection settings, a full audit log, and budgets per key.

Create an account → See Observability