PromptGuard vs Portkey
Portkey is an AI gateway with guardrails built in, and since 29 May 2026 part of Palo Alto Networks. Its built-in checks are deterministic ones, such as regex, JSON schema and allowed models, plus LLM-based checks for moderation, language, PII and gibberish, and a catalogue of partner security vendors. Routing traffic and detecting attacks are different jobs, and the common setup runs both: Portkey routes, retries and logs, and a security layer decides what is an attack or a leak. We maintain a Portkey guardrail plugin for exactly that.
We wrote this, so read it accordingly. Everything in the Portkey column was taken from their own public material, read 16 October 2026, and each claim links its source with the date we read it. Where their material does not state something we say that, rather than claiming they cannot do it. Our own figures come from the same constants the rest of this site renders, and what we say about how PromptGuard works follows our own documentation.
- What it is
- PromptGuard
A security layer: a detection engine that runs as a gateway in front of your provider, or behind another gateway through our guard API.
PortkeyAn AI gateway (its README says 1,600+ models) with fallbacks, automatic retries, load balancing, request timeouts, guardrails and an MCP gateway. The gateway is open source under MIT; Portkey also runs it as a hosted service.
Source: Portkey gateway README, read 16 October 2026; Portkey pricing, read 16 October 2026
- Ownership
- PromptGuard
Independent company. The detection engine is the product.
PortkeyPart of Palo Alto Networks: the acquisition closed on 29 May 2026, and Portkey is the core AI gateway for Prisma AIRS.
Source: Palo Alto Networks: acquisition of Portkey completed, read 16 October 2026
- Guardrails that ship with it
- PromptGuard
15 detectors across 6 layers; 46 PII entity types detected and redacted.
PortkeyDeterministic checks such as regex match, JSON schema, word and character counts, model allow-lists, JWT validation and webhooks; LLM-based checks for content moderation, language, PII and gibberish; and partner guardrails from vendors including Aporia, Pangea, Lasso Security, Prompt Security and Palo Alto Networks Prisma AIRS.
Source: Portkey list of guardrail checks, read 16 October 2026
- What happens when a check fails
- PromptGuard
Our guard API returns allow, block or redact for each scan, under the policy configured on your project, and on redact it returns the messages with the PII it found replaced.
PortkeyConfigurable. A failed check can deny the request (status 446) or let it through flagged (status 246, the default). Checks run asynchronously by default, logging without adding latency, or inline before the request or response is sent, and fallbacks or retries can trigger on either status.
Source: Portkey guardrails documentation, read 16 October 2026
- PromptGuard inside Portkey
- PromptGuard
We maintain a guardrail plugin for the Portkey gateway. It scans the latest user message before the call and every completion after it: allow passes, block fails the guardrail, redact rewrites the content with secrets and PII masked. It fails closed when PromptGuard cannot be reached unless blockOnError is false; a plugin with no API key or base URL configured passes traffic unscanned rather than take the gateway down. An earlier version was submitted to Portkey's gateway as pull request #1595; it calls older endpoints, has no blockOnError setting and fails open. The current version, which fails closed, installs into a Portkey gateway you build and run yourself, and is available from us on request.
PortkeyPromptGuard is not in Portkey's list of guardrail checks or in the plugins directory of its open-source gateway. An earlier PromptGuard plugin is open as pull request #1595 on that repository and has not been merged.
Source: Portkey list of guardrail checks, read 16 October 2026; Portkey gateway plugins directory, read 16 October 2026; Portkey-AI/gateway pull request #1595, read 16 October 2026
- Evidence behind the detection claim
- PromptGuard
F1 0.887, 95% CI [0.874, 0.900], across 2,369 samples from 8 datasets (5 independently published). Methodology and datasets named.
PortkeyNot stated in their guardrails documentation: no detection-accuracy figure is published for the built-in LLM-based checks.Absence of a published claim, not of a capability.
Source: Portkey guardrails documentation, read 16 October 2026; Portkey list of guardrail checks, read 16 October 2026
- Pricing
- PromptGuard
Public. $0 with 20K requests/month and no card, then $99/month.
PortkeyPublic: the open-source gateway to host yourself, a free Developer plan, Production at $49/month and Enterprise on custom pricing.
Source: Portkey pricing, read 16 October 2026
- Runs inside your network
- PromptGuard
Managed cloud, hybrid self-host in your VPC, or air-gapped behind default-deny egress.
PortkeyYes: the open-source gateway is self-hosted, listed as Host it Yourself on their pricing page.
Source: Portkey pricing, read 16 October 2026; Portkey gateway README, read 16 October 2026
Choose Portkey when
- You need a gateway first: routing across many models with fallbacks, automatic retries, load balancing and request timeouts. Our own routing is deliberately narrower: priority-ordered rules that rewrite the provider or model, and one retry against a failover provider when the primary returns a 5xx on a non-streaming request.
- Your checks are structural, such as JSON schema, regex, allowed models or required metadata, and you want them in the same config as your routing.
- You are standardising on Palo Alto Networks. Portkey is now the AI gateway for Prisma AIRS, and Prisma AIRS is one of its partner guardrails.
Choose PromptGuard when
- You run the Portkey gateway yourself and want a dedicated detection engine in its guardrail slot, for prompt injection, PII, secrets and exfiltration, with a benchmark you can check.
- You want detection that does not depend on your gateway vendor. The same policy applies through Portkey, LiteLLM, our SDKs or our own gateway.
- You do not run a gateway and do not want to. PromptGuard is itself an OpenAI-compatible gateway, so you can swap one base URL and stop there.
Sources: Portkey gateway README (read 16 October 2026) · Portkey pricing (read 16 October 2026) · Palo Alto Networks: acquisition of Portkey completed (read 16 October 2026) · Portkey list of guardrail checks (read 16 October 2026) · Portkey guardrails documentation (read 16 October 2026) · Portkey gateway plugins directory (read 16 October 2026) · Portkey-AI/gateway pull request #1595 (read 16 October 2026) · Our guard API · Our gateway: routing rules and failover · Our benchmark methodology. Think we have something wrong? Tell us and we will correct it.
Secure your AI applicationin production
Get protected in under 2 minutes — swap a base URL, no code change. Every request is judged before it reaches the provider, in our cloud or entirely inside your network.