Product

Privacy-first LLM gateway for AI applications

Provider-agnostic. BYOK by default. Sensitive data masked before any provider call.

One endpoint in front of OpenAI, Anthropic and other providers — with PII masking and rehydration applied at the edge so the model never sees personal or secret values.

What is Privian's LLM Gateway?

Privian's LLM Gateway is a privacy-first routing layer that sits between your AI application and model providers such as OpenAI and Anthropic. Every request passes through one endpoint where Privian applies privacy, security, routing and data-control capabilities — PII detection and masking before the provider call, provider selection and BYOK credential handling during it, and rehydration of protected values afterwards.

Definition

What is an LLM gateway?

A privacy-first gateway changes both where requests are routed and what content crosses the provider boundary.

Privian runs masking and rehydration before any provider call. See the glossary entry for a longer definition, or the AI Security Layer category page for how it fits into the broader stack.

LLM gateway request flowApplication request passes through gateway policy checks and provider routing before the response returns.Applicationone endpointGatewayauthenticatePolicy checksdetect and maskProvider routingcustomer BYOKResponserehydratedApplication request passes through gateway policy checks and provider routing before the response returns.
LLM gateway request flow

Why it matters

Why privacy-first routing matters

A pure routing gateway changes nothing about what the provider sees. Customer emails, internal documents, support transcripts and developer scratch prompts all reach the model verbatim. A privacy-first gateway shrinks that exposure surface at the edge.

  • Customer identifiers in product AI features
  • Employee data in internal copilots
  • Ticket content in customer support workflows
  • Secrets and API keys in developer experimentation

How it works

Inside a gateway request

  1. Step 1

    Client → Privian

    Your app POSTs prompt + model to a single Privian endpoint with a gateway API key.

  2. Step 2

    Detection

    Inbound prompt is scanned for personal and sensitive entities.

  3. Step 3

    Masking

    Detected values are replaced with deterministic placeholders (PERSON_1, EMAIL_2, ...) for the request.

  4. Step 4

    Provider call

    Masked prompt is forwarded to the configured provider using your decrypted BYOK credentials.

  5. Step 5

    Rehydration

    The provider response is scanned and placeholders are restored from the in-memory mapping.

  6. Step 6

    Response

    Your app receives a normal, rehydrated response. The mapping is discarded.

Framework

Gateway request sequence

  1. 01

    Authenticate

    Validate the gateway key and request shape.

  2. 02

    Protect

    Detect and mask supported sensitive values.

  3. 03

    Route

    Select the provider from the namespaced model id.

  4. 04

    Restore

    Rehydrate the provider response in memory.

Technical

Technical implementation

Provider-namespaced models

Models are addressed as provider/id, e.g. openai/gpt-4o-mini or anthropic/claude-sonnet-4-5. The full list lives in the models catalog.

BYOK credentials

Provider keys are stored AES-GCM encrypted at rest. They are decrypted in-process only while routing a request.

OpenAI-compatible

Drop-in OpenAI Chat Completions endpoint. Use the OpenAI SDK by setting baseURL to https://api.privian.io/v1.

Zero retention

Raw prompts and responses are never persisted. Only structural counters are kept for observability.

Example

Example request

Privian is OpenAI Chat Completions-compatible — point the OpenAI SDK (or any HTTP client) at https://api.privian.io/v1/chat/completions.

curl -sS -X POST "https://api.privian.io/v1/chat/completions" \
  -H "Authorization: Bearer $PRIVIAN_GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4o-mini",
    "messages": [
      { "role": "user", "content": "Email me at michael@example.com about ticket #4821." }
    ]
  }'

Provider-namespaced model ids from the Privian catalog. The legacy /v1/gateway endpoint with the { prompt, model } shape also remains supported. See the API reference for the full request and response shape.

Application to gateway

Application sends: "Email michael@example.com about ticket #4821."

Gateway to provider

Provider receives: "Email EMAIL_1 about ticket #4821."

Capabilities

Supported capabilities

  • Multi-provider routing

    OpenAI, Anthropic and other providers behind one endpoint.

  • PII masking

    Personal and secret entities replaced before the provider call.

  • Rehydration

    Placeholders restored in the response so your app sees real values.

  • BYOK

    Your provider credentials, encrypted at rest, used at request time.

  • Gateway API keys

    Scoped Privian keys (sk-gw_live_… / sk-gw_test_…) for your apps.

  • Structural observability

    Counters and metadata without storing raw prompts.

Transparency

Current limitations

  • No streaming yet (stream: true is rejected)
  • No tool / function calling
  • No JSON mode / structured outputs
  • No multimodal content (text only)
  • No Responses API
  • No HIPAA / SOC 2 / PCI claims at this time

Differentiation

Why use a privacy-first LLM gateway?

Gateways fall into two broad categories. Both are legitimate — they solve different problems, and many teams eventually need both sets of capabilities.

Routing-only gateways

Focused on operational concerns: provider abstraction, failover, caching, rate limiting, cost attribution and logging. Request content is forwarded as-is, so whatever your application sends is what the provider receives.

  • Optimizes for availability, cost and observability
  • Content controls remain the application's responsibility
  • Data-flow questions are answered at the provider boundary

Privacy- and security-aware gateways

Do everything a routing layer does, and additionally inspect and transform request content before it crosses the provider boundary — detection, masking, rehydration and defined retention behaviour in the request path.

  • Optimizes for what leaves your boundary, not just where it goes
  • Controls are enforced centrally rather than per feature
  • Produces an explainable data path for security reviews

Privian sits in the second category. If your blocker is cost and failover, a routing gateway may be enough; if it is sensitive data reaching model providers, content-level controls are the part that matters.

Evaluation

What to evaluate in an LLM gateway

A short framework for comparing gateways during a technical evaluation. Test each dimension against your own traffic rather than vendor descriptions.

Framework

LLM gateway evaluation criteria

  1. 01

    Privacy controls

    Are content-level controls applied in the request path, or only at the network layer?

  2. 02

    Sensitive-data handling

    Which entity types are detected, and can protected values be restored in the response?

  3. 03

    Routing

    How are providers and models addressed, and how much application change does switching require?

  4. 04

    Observability

    What is recorded — and is raw prompt content stored to produce it?

  5. 05

    Provider support

    Which providers and models are reachable through one integration today.

  6. 06

    Latency

    The added per-request overhead of inspection and routing under your own load.

  7. 07

    Retention behaviour

    What is persisted, for how long, and what is discarded after the response.

  8. 08

    Developer experience

    SDK compatibility, error semantics, key management and time to first request.

  9. 09

    Enterprise-readiness documentation

    Whether the data path, subprocessors and controls are documented well enough to survive a security review.

Privian's answers to these are published on the data path, supported models and Trust Center pages, with side-by-side framing in the comparisons.

FAQ

Frequently asked questions

What is an LLM gateway?
An LLM gateway is a routing layer that accepts AI requests from your application and forwards them to one or more model providers. It is where authentication, model selection, routing and observability live. Privian adds PII detection, masking and rehydration on top of that routing layer.
Why use an LLM gateway?
A gateway gives you one integration point instead of one per provider: shared authentication, provider-agnostic model ids, consistent observability, and a single place to enforce data controls. Without it, every provider change and every privacy control has to be re-implemented in application code.
Can an LLM gateway mask PII?
Only if the gateway implements it. Routing-only gateways forward whatever your application sends. Privian detects supported sensitive entities in the inbound prompt, replaces them with deterministic placeholders before the provider call, and rehydrates the response in memory.
What is the difference between an LLM gateway and an AI gateway?
The terms overlap. "AI gateway" is usually the broader term for any proxy in front of AI providers, often focused on routing, caching, rate limiting and cost control. "LLM gateway" specifically refers to the layer in front of large language model providers. Privian is an LLM gateway with privacy and data-control capabilities in the request path.
Can Privian route requests to multiple LLM providers?
Yes. Models are addressed as provider/id — for example openai/gpt-4o-mini or anthropic/claude-sonnet-4-5 — so one endpoint and one client integration can reach several providers. See the supported models page for the current catalog.
Does Privian protect prompts before they reach model providers?
Yes. Detection and masking run at the gateway before the outbound provider call, so only masked content leaves the boundary for entities the detector supports. Raw prompts and responses are not persisted.
Can I use Privian with OpenAI and Anthropic?
Yes, using your own provider credentials (BYOK). Keys are stored AES-GCM encrypted at rest and decrypted in-process at request time; provider token usage continues to bill against your own provider account.
Is an LLM gateway useful for AI SaaS companies?
It is often the fastest way to answer enterprise security questions about AI data flows: one documented boundary where prompts are inspected and protected, provider credentials are held, and retention behaviour is defined — rather than controls scattered across application code.
How is Privian different from a generic AI gateway?
A generic AI gateway routes traffic — whatever you POST, the provider sees. Privian is privacy-first: sensitive values are detected and replaced with deterministic placeholders before the provider call, then restored in the response.
Does Privian support the OpenAI SDK as a drop-in?
Yes — for non-streaming Chat Completions. Point the OpenAI Python or Node SDK at https://api.privian.io/v1 as the base URL and call /chat/completions with model + messages[]. Streaming, tool/function calling, JSON mode, multimodal content, and the Responses API are not yet supported.
How does BYOK work?
You add your provider credentials (OpenAI, Anthropic, etc.) in the dashboard. They are encrypted at rest using AES-GCM and decrypted in-process at request time. Token usage continues to bill against your provider account — Privian does not resell tokens.
Does the gateway store prompts or responses?
No. Raw prompts and responses are never persisted. Only structural counters are kept for observability.

Enterprise review

Questions buyers commonly ask

Can we use our own provider account?
Yes. Privian uses your encrypted provider credentials at request time; provider usage remains on your account.
Does Privian route requests?
Yes. The gateway selects the configured provider from the provider-namespaced model id after applying request controls.
Can providers be changed later?
Yes. Applications use one gateway endpoint while model selection identifies the target provider.
Are prompts retained?
No. Raw prompts and responses are not persisted; structural counters support observability.

Start building

Send your first masked prompt

Scope

What this does NOT solve

Plans & pricing

See pricing for Privian's privacy-first LLM gateway

Pricing is published transparently. BYOK, zero retention, provider-agnostic. Beta plans may change.