LLM Gateway
Features

Compliance

Restrict routing to providers that meet your compliance requirements (ZDR, SOC 2, ISO 27001, GDPR, no prompt training)

Provider compliance policies let you guarantee that requests are only ever routed to providers that meet your organization's regulatory requirements. When a request would be routed to a provider that doesn't meet the policy, the gateway blocks it before any data leaves the gateway.

The complete provider compliance policy is available on Enterprise. DevPass offers only No AI training.

For providers managed entirely through Airside, policy checks use the active carrier's self-declared profile, including subsequent edits. No separate compliance review is required. Missing facts fail the corresponding policy requirement; provider allowlists and blocklists keep using the same provider ID. Catalogue providers claimed in Airside can also declare their own SOC 2, ISO 27001 and GDPR status: a declared value replaces the reviewed catalogue value, and an unstated one keeps it.

Requirements

Enable a policy under Settings → Compliance in the dashboard and toggle the requirements you need:

In DevPass, enable No AI training directly under Settings. It uses the same fail-closed provider policy described below, but the other requirements are not available on DevPass.

RequirementA provider is allowed when…
Zero data retention (ZDR)it does not log prompts and declares a zero-day retention period
No training on promptsit does not train on API prompts
No stealth providersit is not a stealth provider
GDPR compliantit is GDPR compliant
SOC 2 (Type 1 or 2)it holds a SOC 2 report of any type
SOC 2 Type 2it holds a SOC 2 Type 2 report specifically
ISO 27001it holds an ISO 27001 certification
SOC 2 Type 2 or ISO 27001it holds either a SOC 2 Type 2 report or ISO 27001

Every requirement is fail-closed: a provider passes only if its published data policy explicitly satisfies the requirement. If an attribute is unknown for a provider, that provider is treated as non-compliant.

Some models retain data on a provider that is otherwise zero-retention, for example models that require AWS human review on Bedrock. The data policy is checked per model, so Zero data retention (ZDR) routes those models only to providers that meet it for that model, even when the provider passes in the Provider Impact preview.

Before enabling Zero data retention (ZDR), set the organization's data retention to Metadata Only and disable response caching in every project. While ZDR is active, Retain All Data and project response caching are unavailable, gateway response caching is bypassed, provider prompt-cache markers are stripped, Responses API requests must set store: false, and asynchronous video generation is unavailable because video jobs require temporary output storage. Disable ZDR before turning payload retention or caching back on. ZDR is a separate Enterprise compliance policy and is unchanged by the Enterprise requirement for Retain All Data itself. ZDR does not stop the gateway content filter from keeping an encrypted copy of requests flagged for child safety; see Flagged Content.

Existing policies that use the deprecated No prompt logging rule continue to enforce their original provider-routing behavior. The legacy rule is no longer available for new configuration and does not enable the gateway-level ZDR controls described above.

Stealth providers are undisclosed platforms that LLM Gateway routes to without naming the operator, so their data policy and headquarters are unknown. That already makes them fail every certification and data-policy requirement above, but No stealth providers excludes them explicitly — useful when you want them gone without turning on any other requirement.

The settings page shows a live Provider Impact preview of which providers are allowed (green) and which are blocked (red) under the current policy, so you can see the impact before saving. Hovering a blocked provider lists exactly which requirements it does not meet — a missing certification, its data policy, its headquarters country, or a provider-list restriction.

Provider headquarters

Beyond certifications, you can restrict routing by the country a provider is headquartered in. The Provider Headquarters card presents a country selector, and requests are only routed to providers based in a selected country.

The selector only offers countries that are referenced by a catalogue provider or active Airside profile — browse the providers directory to see the current set and each provider's headquarters. Selecting no country applies no location restriction. The country filter is also fail-closed: when at least one country is selected, a provider whose headquarters is unknown is treated as non-compliant.

The country filter composes with the certification and data-policy requirements above — a provider must satisfy all active requirements to be allowed.

Provider & model restrictions

Beyond attribute-based requirements, the Provider & Model Restrictions card lets you block or allow individual providers and models:

  • Blocked providers / blocked models — deny lists. A listed provider or model is always blocked, even when it satisfies every requirement above.
  • Allowed providers / allowed models — fine-grained allow lists. When non-empty, only the listed providers (or models) may be used; everything else is blocked. An empty list applies no restriction.

Model lists take versioned model IDs. An entry also covers requests through a virtual model alias that currently resolves to it.

Deny lists always win over allow lists, and both compose with the requirements above — an allow-listed provider must still satisfy every active certification, data-policy, and country requirement.

A non-empty allowed-providers list blocks every provider not on it, regardless of certifications or data policy. If you allow-list only a custom provider, all catalogue providers show as blocked with the reason "Not on the allowed-providers list" — add any additional provider you want to use to the allow list.

The selectors include your organization's own custom providers (stored as custom:<name> refs) and their custom-catalog models (stored as <name>/<model> refs), so a specific custom deployment can be blocked or allow-listed individually just like a catalogue provider.

Choosing a compliant provider

The provider dropdowns are policy-aware, so you can tell before adding a provider to a list whether it satisfies your policy:

  • A green shield marks a provider that meets every active certification, data-policy, and headquarters requirement.
  • A red shield marks a provider that does not; the requirements it misses (for example "May log prompts" or "Headquartered in China, which is not an allowed country") are listed under its name.
  • The "Only providers that meet policy requirements" toggle at the top of the dropdown hides incompatible providers entirely.

These indicators evaluate the requirements only — deliberately ignoring the allowed/blocked lists themselves — so an active allow list never paints every other provider red while you're deciding what to add to it. Your own custom providers are evaluated against their self-attested posture; one without an attestation on file shows "No compliance attestation on file".

Elsewhere in the dashboard (for example the API-key provider filter), the colored dot next to a provider is simply the provider's brand color and carries no compliance meaning.

Organization-level restrictions are organization-wide and take precedence over member-level and API-key-level IAM rules: they are enforced after IAM evaluation, so no user-, team-, or key-level allow rule can grant access to a provider or model the compliance policy excludes.

API key policies

On Enterprise, open an API key’s Compliance action to configure the same requirements, headquarters filters, and provider/model lists for that key. Organization owners and admins can manage these policies. Settings → Compliance also lists active, unexpired keys with explicit settings across the organization’s projects, including policies that are currently disabled.

The organization policy is a mandatory baseline, not an overridable default:

  • Every enabled organization requirement still applies; a key can only add restrictions.
  • Provider, model, and country allowlists must each pass both policies. Disjoint allowlists block all matching traffic.
  • A blocklist at either level wins over an allowlist at the other.
  • Disabling or removing the key policy leaves organization restrictions intact. With the organization policy off, an enabled key policy works independently.

Key-level Zero data retention forces metadata-only logging and bypasses caching for that key’s requests without changing organization retention or other keys. It also requires store: false for Responses requests and blocks asynchronous video generation. Unlike organization-wide ZDR, it does not require changing every project’s caching settings first.

Configuring key policies requires Enterprise access. Saved restrictions remain enforced after a subscription change; owners and admins can remove a key policy to return to organization-only enforcement. Compliance alerts continue to evaluate the organization policy, not individual key policies.

Deployment rollout

Key-level policy configuration is off by default. After applying the database migration, upgrade every gateway instance and drain pre-upgrade realtime sessions. Then set API_KEY_COMPLIANCE_ENABLED=true on the internal API to allow new key-policy settings. Deploy the editor last. Until enabled, key-policy create/update requests return 503; ordinary key operations and organization policy updates are unaffected. Owners and admins can still clear a key policy with null.

The rollout switch controls configuration only: saved organization and API-key restrictions remain enforced even when the switch is off. Existing keys default to no explicit policy and continue to use their organization policy unchanged.

Organization policies continue to govern video creation without retroactively blocking historical video downloads. An enabled key policy additionally checks historical video access against both organization and key restrictions.

Enforcement

When no available provider for a model meets the policy — or a pinned provider is non-compliant — the gateway returns a 403:

{
	"error": {
		"message": "This request was blocked by your organization or API key provider compliance policy. No available provider for requested-model meets the required certifications or provider/model restrictions. Contact your LLMGateway admin to adjust the policy."
	}
}

This applies to both routing modes:

  • Automatic routing — non-compliant providers are removed from the candidate set, and the request is blocked if none remain.
  • Pinned providers — a request such as deepseek/deepseek-v4-pro is blocked when that specific provider does not meet the policy.

Each block is recorded as a security event so administrators can review what was rejected and why.

Web search engines

When a model without native web search gets a web_search tool, LLM Gateway sends the queries the model writes to a search engine. On the single-search path (models that cannot call tools, /v1/responses, n above 1, and a few other cases listed there), a query model on Google AI Studio writes the queries from the latest turns instead. Your policies apply to both with the same rules as a provider:

  • The query model, used only on the single-search path, is checked as the Google AI Studio provider. When the policy rejects it, the gateway skips it and searches your latest user message instead.

  • Perplexity is checked as the Perplexity provider: blocking or not allowing Perplexity also stops its searches.

  • Exa is checked against its own data policy: it may retain queries and use them for training. Provider lists address it as exa, so a provider allow list blocks it.

A search the policy rejects is skipped and not billed. With tool_choice: {"type": "web_search"}, the request fails with a 403 instead. Native web search is part of the provider serving the request, which the policy already covers.

Custom providers

Custom providers point at infrastructure your organization operates itself (for example, models hosted in your own cloud account), so they have no entry in the provider catalogue and no published data policy. Under any enabled compliance policy they are therefore blocked by default — the same fail-closed rule that applies to catalogue providers with unknown attributes.

To route through a custom provider while a policy is active, an organization owner or admin can record a self-attestation of that provider key's compliance posture under Models → Compliance attestation in the dashboard. The attestation covers the same attributes as a catalogue data policy — SOC 2 report type, ISO 27001, GDPR, training on API prompts, prompt logging, retention period, and the country the deployment is operated from — and the gateway evaluates it against your policy with identical fail-closed rules: an attribute left "unknown" never satisfies a requirement, and only an explicit "No" satisfies requirements like "No training on prompts". Clearing the attestation restores the blocked state.

LLMGateway does not verify attestations — they are your organization's own assertion about infrastructure you operate. Every attestation change is recorded in the audit log with the attesting user and timestamp.

Attestations only apply to custom provider keys. They can never be used to clear a catalogue provider that fails your policy.

Known limitation: the country selector in the compliance policy only offers countries referenced by catalogue providers or active Airside profiles (see the providers directory). A custom deployment attested to a country outside that set cannot be allowed while a country restriction is active.

Compliance alerts

Once a policy is saved and enabled, owners and admins on the Enterprise plan can configure Compliance Alerts at the bottom of the Compliance page:

  • Watched models: pick models that no compliant provider serves yet, up to 100 per organization. Retired models and models blocked by your own model lists are not offered. When a compliant provider starts serving one, LLM Gateway notifies you once — including when your own policy change makes it available. If the model later loses its last compliant provider, the watch re-arms. A model that is already available when you add it is recorded as available, so it sends no initial alert; it can still alert later if it loses its last compliant provider and becomes available again.
  • Downgrades (on by default): get notified when a provider stops meeting your policy, for example because it loses a certification or starts training on API data. When the audience is owners and admins, that alert also lists the models your organization used on the provider in the last 30 days that no longer have a compliant provider; it is left out for the everyone audience, because it spans every project. A watched model losing its last compliant provider is announced separately. Changes to your own policy never trigger downgrade alerts, and the first check after enabling alerts only records the current state.
  • Recipients: choose the lowest role that receives alerts — owners only, owners and admins, or everyone in the organization. Higher roles are always included. Owners and admins are linked to this page; other recipients land on the Models page, which shows the same eligibility. Watching the first model saves the defaults: owners and admins, in-app and email delivery, downgrade alerts on.
  • Delivery: in-app, email, and Slack. In-app and email reach each recipient individually and email needs a verified address; Slack is posted once per organization. Each recipient can turn off in-app or email delivery per alert type under notification settings in the dashboard bell.

Alerts are checked every minute against the saved policy. Disabling the policy or leaving the Enterprise plan stops the checks.

Slack

Create a Slack incoming webhook for the channel that should receive alerts and save its URL under Notification Channels on the organization Preferences page — only https://hooks.slack.com/services/… URLs are accepted. Once saved, use Send test message to verify it, then enable Slack in the Compliance Alerts card. The webhook URL is stored encrypted and only shown masked. Failed posts are retried up to five times within 24 hours, and removing the webhook also turns Slack off in the alert settings.

Safety identifiers

LLM Gateway keeps your end-user identifier separate from its provider-facing organization identifier. Sending an identifier helps correlate your users’ requests in gateway logs; it does not let you choose or override the identifier sent to providers.

Send an end-user identifier

Choose a stable, opaque value for each end user and send it in the request body:

EndpointRequest field
Chat completions (/v1/chat/completions)safety_identifier or user
Responses (/v1/responses)safety_identifier or user
Responses compaction (/v1/responses/compact) and decisions (/v1/decisions)safety_identifier
Native Messages (/v1/messages)metadata.user_id
Embeddings (/v1/embeddings)user
Images (/v1/images/generations, /v1/images/edits) and videos (/v1/videos)safety_identifier or user
Audio (/v1/audio/speech, /v1/audio/transcriptions as a form field)safety_identifier or user
Moderations (/v1/moderations), OCR (/v1/ocr), rerank (/v1/rerank), search (/v1/search)safety_identifier or user
Realtime WebSocket (/v1/realtime)safety_identifier or user query parameter
Realtime client secrets (/v1/realtime/client_secrets)safety_identifier; it replaces any value on the WebSocket URL of sessions using the secret
AI SDK provider (@ai-sdk/gateway)providerOptions.gateway.user or providerOptions.llmgateway.safety_identifier

Batch request lines for chat completions, Responses, and embeddings use the same fields as those endpoints.

For example, replace your-model-id with a model from the models directory:

curl https://api.llmgateway.io/v1/chat/completions \
  -H "Authorization: Bearer $LLM_GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "your-model-id",
    "messages": [{ "role": "user", "content": "Hello" }],
    "safety_identifier": "app-user-42"
  }'

Use a non-empty value of at most 128 characters. Where both are listed, legacy user is used when safety_identifier is absent or null. Longer safety_identifier values in a JSON body are rejected; longer user or metadata.user_id values, and longer values in a form field or WebSocket query parameter, are not recorded as safety identifiers.

In both credits and bring-your-own-key mode, the client value is saved in request log metadata as params.safety_identifier, even without debug logging. Rejections before the body is parsed, such as early rate limits, may not include it. Reuse it for the same end user when correlating traffic or reporting requests to us. It remains metadata when prompt/completion retention is disabled and is subject to metadata retention. Do not include personal data; it is not an authentication or authorization mechanism.

What providers receive

LLM Gateway generates an opaque, random identifier once per organization. It is not your organization ID, reveals no API key, and contains no personal data. Every request from the organization shares this provider-facing identifier, across all of its projects and API keys and after key rotation, even if requests carry different client safety_identifier values. It is not derived from your client value and cannot be overridden by it.

  • Credits: upstream APIs that support abuse attribution receive the fixed organization identifier when forwarding is enabled on the gateway-managed credential, mapped to the field or header their API expects. Your client identifier is not forwarded as their safety identifier.
  • Bring your own key (BYOK): neither the gateway identifier nor your client identifier is sent as a provider safety identifier.
  • Hybrid: the credential used on each attempt determines the behavior, including retries and fallback. An attempt using your provider key follows BYOK behavior; one using LLM Gateway’s credentials follows credits behavior.

Upstream request IDs

Every upstream attempt to OpenAI or Azure OpenAI except video jobs, in credits and BYOK mode, carries a fresh random lgr_… ID in the provider's client request ID header (X-Client-Request-Id or x-ms-client-request-id), stored on that attempt's request log. HTTP requests also store the provider's own x-request-id when its response includes one, so a provider report quoting either ID maps to the exact request, API key and organization. Realtime WebSocket sessions store only the client request ID, which maps to the session's log rows, API key and organization. The gateway generates the client request ID; clients cannot set it.

Access Control

Only organization owners and admins can view and change the compliance policy.

Project-scoped developer members cannot see the policy itself, but they can browse the org's available providers and models — including custom providers and their model catalogs — read-only on the Models page. This is the recommended way for developers to discover what they can call without being granted additional permissions.

  • Notifications — per-user in-app and email delivery preferences, including compliance alerts.
  • Org Models Directory — see per-model eligibility under the active policy in the dashboard.
  • Data Retention — control whether request and response payloads are stored (Retain All Data is Enterprise only).
  • Guardrails — detect and block harmful or sensitive content.

Get Started

DevPass subscribers can configure No AI training under Settings. Contact us for the complete provider compliance policy.

How is this guide?

Last updated on

On this page

Ready for production?

Ship to production with SSO, audit logs, spend controls, and guardrails your security team will approve.

Explore Enterprise