Shadow vs Portkey — Portkey PII redaction alternative that restores responses
Portkey is an AI gateway and control plane: an open-source gateway for routing to many model providers, plus a hosted platform for observability, prompt management and guardrails. Shadow is an open-source privacy layer that replaces sensitive values with realistic, reversible fakes before requests leave, and restores them in responses, streams and tool calls. Portkey’s PII redaction is one-way and comes from partner guardrails; Shadow’s masking is reversible and runs locally.
At a glance
Section titled “At a glance”| Shadow | Portkey | |
|---|---|---|
| Open source / licence | Yes, Apache-2.0 | Gateway MIT; guardrails and platform in Portkey’s cloud |
| Deployment | Endpoint HTTPS proxy, gateway (/gw/<provider>/), Rust library | SaaS, hybrid, or self-hosted OSS gateway |
| Protection method | Reversible realistic fakes from a persona; typed tokens for reports; optional redaction | Redaction via partner guardrails (Pangea, Bedrock, Azure, Patronus) and regex checks |
| Restores responses | Yes, automatically | No (docs describe redaction as one-way) |
| Streaming | Yes, SSE and NDJSON with split-fake reassembly | Not documented for PII redaction |
| Tool calls | Yes, arguments restored locally; intent-aware for provider-hosted tools | Not documented for PII |
| Files | DOCX, XLSX, PPTX masked in place; PDF to text; CSV, JSON, HTML | Not documented |
| Self-hosted | Yes, single binary, no account | Gateway yes; partner guardrails are hosted services |
| Price model | Free | SaaS tiers and enterprise plans |
What Portkey does well
Section titled “What Portkey does well”- Routing and reliability. One API over many providers with fallbacks, retries, load balancing, caching and conditional routing.
- Observability. Request logs, traces, cost and latency analytics, and feedback in a hosted dashboard.
- Prompt management. Versioned prompt templates and a playground for teams.
- Guardrail marketplace. Portkey can call many guardrail partners, so you can combine PII, safety and content checks without integrating each vendor yourself.
- Open-source gateway. The gateway itself is MIT-licensed and widely used, and can run in your own environment.
- Enterprise direction. Palo Alto Networks announced its intent to acquire Portkey in April 2026 as part of Prisma AIRS, which may matter to buyers standardising on Palo Alto’s platform. Closing was not verified at review time.
Where Shadow is different
Section titled “Where Shadow is different”Can Portkey put redacted values back in the answer?
Section titled “Can Portkey put redacted values back in the answer?”Portkey’s PII redaction docs describe the transformation as one-way. That is safe, but the answer then contains placeholders, and an agent cannot act on a redacted email address. Shadow keeps a real-to-fake mapping in an encrypted local vault and restores its fakes in JSON, streamed responses and tool-call arguments.
Where does the data go before it is masked?
Section titled “Where does the data go before it is masked?”With hosted partner guardrails, the unmasked prompt is sent to a guardrail service to be checked. Shadow detects locally with built-in detectors and, optionally, local NER models or Presidio on loopback. Plaintext is never sent to a guardrail service; only the masked request leaves the host, apart from message recipients and the values a provider-hosted action needs, which are kept real by default and logged. No account, no telemetry.
Realistic fakes and intent
Section titled “Realistic fakes and intent”Shadow’s fakes come from a persistent persona, so prompts stay coherent and consistent across sessions. The intent policy uses typed tokens for bulk reports and a logged keep for message recipients and provider-hosted action targets.
Shadow masks DOCX, XLSX and PPTX uploads in place and PDF text before upload (file masking).
When should you choose Portkey?
Section titled “When should you choose Portkey?”- You need a managed control plane: routing, observability, prompt management and governance for many teams.
- One-way redaction is acceptable and you want to buy guardrails from several vendors through one integration.
- You are standardising on Palo Alto Networks’ AI security stack.
When should you choose Shadow?
Section titled “When should you choose Shadow?”- Answers and agent actions need the real values back.
- Data must be masked before it leaves the machine or the pod, without a hosted guardrail call.
- You want an open-source, self-hosted tool with no account.
Can you use Portkey with Shadow?
Section titled “Can you use Portkey with Shadow?”Yes. Run Shadow as a sidecar or on developer machines and send traffic through Shadow before it reaches Portkey, or configure the self-hosted Portkey gateway to call providers through Shadow’s HTTPS proxy. Portkey still sees request metadata, cost and latency, while the values Shadow detected are already masked in its logs, which also keeps them out of observability storage. Disable Portkey’s PII redaction guardrail on those routes so values reach Shadow intact when Shadow sits downstream. See integration modes.
Migrating Portkey PII redaction to Shadow
Section titled “Migrating Portkey PII redaction to Shadow”- Keep Portkey for routing and observability.
- Turn off the PII redaction guardrail on the routes Shadow will cover.
- Install Shadow next to the client or the self-hosted gateway (Docker and Kubernetes).
- Route provider traffic through Shadow’s proxy or gateway.
- Add company names and codenames as dictionary terms and check coverage with
shadow scan.
How do they compare on accuracy?
Section titled “How do they compare on accuracy?”Portkey’s detection accuracy is whichever partner guardrail you choose. Shadow’s benchmark publishes leak rate, over-masking and round-trip results with code, against open-source baselines; Portkey and its partner guardrails are not included.
Sources
Section titled “Sources”- Portkey PII redaction
- Portkey AI Gateway on GitHub
- Portkey pricing
- Palo Alto Networks to acquire Portkey (Pulse 2.0)
Last reviewed: 2026-10-31. Portkey is a trademark of its owner; this comparison is based on public documentation as of the review date.
Frequently asked questions
Is Shadow an alternative to Portkey?
Only for data protection. Portkey is an AI gateway and control plane with routing, observability, prompt management and guardrails. Shadow does not route or observe; it masks sensitive values with reversible fakes and restores them in responses. You can run Shadow alongside Portkey.
Does Portkey restore redacted PII in the response?
Portkey's PII redaction documentation describes the transformation as one-way: values are redacted before the request reaches the model and are not put back. Shadow restores its fakes in the response.
Is Portkey open source?
The Portkey AI Gateway is open source under MIT. The PII redaction guardrails run through Portkey's cloud and partner integrations such as Pangea, AWS Bedrock Guardrails, Azure and Patronus. Shadow is fully open source under Apache-2.0.
Was Portkey acquired by Palo Alto Networks?
Palo Alto Networks announced an agreement to acquire Portkey on 30 April 2026, with Portkey positioned as the Prisma AIRS AI Gateway. The closing date was not verified at the time of review.
How much does Portkey cost?
Portkey offers SaaS tiers and enterprise plans; check Portkey's pricing page for current figures. Shadow is free to self-host.