PK

Portkey

Open-source AI gateway with guardrails and observability

AI model gatewayResearch complete

Company overview

Portkey provides an AI gateway with guardrails, observability, caching, routing and budget controls. The gateway is published as an open-source project alongside a hosted platform.

Ideal customer: Product engineering and AI platform teams that want to self-host or start on a hosted tier

  • Guardrails on inputs and outputs
  • Caching and routing across many providers
  • Budget and rate controls per key or workspace

GateYourAI verdict

Portkey sits closest to the middle of the security-and-cost thesis for teams that want optionality: an open-source gateway they can run themselves, with guardrails, observability and budget controls in the same layer. Individual capability marks await documentation verification.

Best for: Teams that want an open-source gateway with guardrails and spend controls. Read how we assess platforms.

Security capabilities

A capability is marked available only when an official page or documentation says so. “Not publicly documented” means we could not find it — not that the vendor lacks it.

Security capabilities for Portkey
CapabilityStatusVerificationSource
Prompt-injection detectionIdentifies attempts to override system instructions in prompts or tool output.Verification pendingVerification pending. Verification pending.Verification pending
Prompt-injection blockingBlocks the request before it reaches the model, rather than only logging it.Verification pendingVerification pending. Verification pending.Verification pending
Jailbreak detectionDetects known jailbreak and guardrail-evasion patterns.Verification pendingVerification pending. Verification pending.Verification pending
PII detectionIdentifies personal information in prompts or responses.Available as a guardrail check.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
PII redactionMasks or removes personal information before it leaves the gateway.Redaction is available through guardrail actions; coverage varies by check.LimitedLimited. Partially documented.Partially documentedPortkey AI Gateway documentation
Secret & credential scanningDetects API keys, tokens and credentials in prompts or output.Verification pendingVerification pending. Verification pending.Verification pending
Input inspectionInspects outbound requests before they reach the model.Input guardrails run before the request reaches a model.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
Output inspectionInspects inbound model responses before they reach the application.Output guardrails run on model responses.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
Content moderationClassifies harmful or policy-violating content. Not equivalent to injection defense.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
Policy enforcementConfigurable rules applied per route, team, key or environment.Guardrails are configured per route, key or workspace.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
Agent & tool controlsConstrains tool calls, autonomous actions and agent permissions.Verification pendingVerification pending. Verification pending.Verification pending
MCP securityControls or inspects Model Context Protocol server traffic.MCP gateway support.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
Audit logsDurable, reviewable record of requests and policy decisions.Request logs and traces.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
Access controlsRoles, teams, keys and scoped permissions.Workspaces, virtual keys and role-based access.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation

Cost-optimization capabilities

Token reduction, avoided calls, cheaper-model routing, budgets and reporting are tracked separately because they are not interchangeable.

Cost-optimization capabilities for Portkey
CapabilityStatusVerificationSource
Prompt compressionReduces the number of tokens actually sent to the model.Not publicly documentedNot publicly documented. Not publicly documented.Not publicly documented
Exact cachingReturns a stored response for a byte-identical request.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
Semantic cachingReturns a stored response for a semantically similar request using embeddings.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
Intelligent model routingChooses a model per request based on task, cost or performance.Conditional routing across providers and models.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
Automatic fallbackRetries against an alternate model or provider on failure.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
Load balancingDistributes traffic across keys, regions or providers.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
Token budgetsHard or soft limits expressed in tokens.Budget limits can be expressed in tokens per key.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
Dollar budgetsSpending limits expressed in currency.Cost budgets per virtual key or workspace.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
Rate limitsRequest throttling. Throttling is not the same as token reduction.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
Cost attributionAttributes spend to teams, keys, users or features.Spend is attributed per key, workspace and metadata tag.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
Cost analyticsDashboards and reporting on token and dollar usage.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
Savings reportingReports the spend avoided by compression, caching or routing.Verification pendingVerification pending. Verification pending.Verification pending

Supported models and deployment options

Hosted platform plus self-hosted open-source gateway. Verification pending.

Models, infrastructure and deployment for Portkey
CapabilityStatusVerificationSource
OpenAISupports OpenAI models.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
AnthropicSupports Anthropic models.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
Google GeminiSupports Google Gemini models.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
AWS BedrockSupports AWS Bedrock as a provider.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
Azure OpenAISupports Azure OpenAI deployments.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
Open-source modelsSupports open-weight models or self-hosted inference endpoints.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
SaaS deploymentVendor-hosted managed service.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
VPC / private cloudDeployable inside a customer cloud account.Private-cloud deployment for enterprise plans.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
On-premiseDeployable in a customer data centre.Verification pendingVerification pending. Verification pending.Verification pending
Self-hostedCustomer runs and operates the gateway themselves.The gateway can be run from the open-source repository.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey-AI/gateway on GitHub
Open-source optionSource code published under an open-source licence.The gateway is published as a public repository.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey-AI/gateway on GitHub
APIProgrammatic API for configuration or traffic.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation
SDKOfficial client libraries.Official Python and Node SDKs.AvailableAvailable. Verified from official documentation.Verified from official documentationPortkey AI Gateway documentation

Pricing status

Verification pending. Open-source gateway available; hosted plan detail not yet verified.

Commercial information for Portkey
CapabilityStatusVerificationSource
Public pricingList pricing published on the vendor website.Verification pendingVerification pending. Verification pending.Verification pending
Free tierA permanently free usage tier.Verification pendingVerification pending. Verification pending.Verification pending
Free trialA time-limited or credit-limited trial.Verification pendingVerification pending. Verification pending.Verification pending
Enterprise planA named enterprise tier.Verification pendingVerification pending. Verification pending.Verification pending
Contact sales requiredPricing requires contacting the vendor.Verification pendingVerification pending. Verification pending.Verification pending

Strengths

  • Open-source gateway published on GitHub
  • Guardrails, observability and cost controls in one product

Limitations

  • Feature parity between the open-source gateway and the hosted platform needs verification
  • Some capabilities are enterprise-tier only and need contract-level confirmation

Alternatives to Portkey

You can also compare Portkey against up to three other platforms, or read the AI Gate pillar page.

Sources

  1. Portkey product site Portkey · Official product page · Accessed 2026-07-30
  2. Portkey AI Gateway documentation Portkey · Official documentation · Accessed 2026-07-30Primary source of truth for capability marks.
  3. Portkey-AI/gateway on GitHub Portkey · GitHub repository · Accessed 2026-07-30

Last reviewed: 2026-07-30

Newsletter

The AI Gateway Brief

A weekly briefing on AI security threats, gateway technology, token economics, model routing, and the infrastructure controlling enterprise AI.

No vendor sponsorship in the brief. Unsubscribe at any time.