Skip to main content
COMPARE

Rungate vs Portkey.

Portkey is a five-module AI platform — Gateway, Observability, Guardrails, Governance, Prompt Management. Rungate is a narrow + deep run-level control plane. Both are in-series proxies. Both are open source. The difference is architectural: Portkey models everything around the virtual key; Rungate models everything around the run.

TL;DR
  • Budgets: Portkey caps per virtual key. Rungate caps per run. If you want “this workflow can’t spend more than $X across all its calls,” that’s Rungate’s default; in Portkey you have to approximate it by issuing one virtual key per workflow.
  • Approval gates: Rungate has HTTP 202 pause/resume on policy-gated tool calls. Portkey has Guardrails (filter/block) and audit, not pause-and-retry.
  • Provider breadth: Portkey wins. 1,600+ LLMs via unified API. Rungate ships OpenAI + Anthropic today, Gemini planned.
  • Platform scope: Portkey wins. Prompt management, semantic caching, multimodal, canary testing, MCP gateway, batching API. Rungate is intentionally narrower.
  • Licensing: Both open-source at the core (Portkey AI Gateway MIT; Rungate Apache 2.0). Both offer managed cloud. Both have self-hostable paths.

Capability comparison

Both sit between your agent and the provider. They do different jobs well. This table is built from Portkey’s public docs as of 2026-04-20; corrections welcome at [email protected].

Capability Rungate Portkey
Proxy patternIn-series HTTPIn-series HTTP + SDK
Governed primitiveRun (workflow)Virtual key
Cross-call budgetYes, native — spans all calls in a runPer key; not per workflow
Human approval gateHTTP 202 pause/resumeNot documented (Guardrails block, don’t pause)
Per-run policy overridex-rungate-policy per requestConfig lives on the key
Error status semantics402 budget, 403 policy, 202 gate, 429 rateGuardrail violations; exact codes not publicly spec’d
Supported providersOpenAI, Anthropic (Gemini planned)1,600+
Prompt managementTemplates + versioning
Semantic cachingBuilt-in
Multimodal (vision, audio, image gen)Passes through; no unified adapterUnified across providers
MCP tool gatewayBuilt-in
LLM guardrails (PII, moderation)Policy-level allowlists/blocklistsDedicated module with integrations
Full-run audit reconstructionNative — every call, tool, gate, approverPer-request logs
Governance on free tierYes — all capabilities free on every tierNo — Production tier ($49/mo) and up
Self-hosted priceFree forever (Apache 2.0)Free forever (AI Gateway, MIT)
Managed cloud free tier500 steps / 30d retention10k logs / 3d retention

When Portkey is the right choice

You need breadth of providers.

1,600+ LLMs including long-tail providers, specialist models, and self-hosted endpoints, all normalized behind one API. If your workflow routes across an unpredictable set, Portkey is pragmatic.

You want prompt management + experimentation.

Templating, versioning, and canary testing live inside Portkey. You can A/B a prompt or a model without rewriting application code.

You need multi-modal routing.

Vision, audio, image generation all unified. Rungate passes these through at the proxy layer but doesn’t yet translate across providers.

You want LLM content guardrails as a first-class module.

PII redaction, content moderation, prompt-injection detection. Portkey’s Guardrails are designed for this. Rungate’s policy engine can express allowlists + blocklists but doesn’t ship ML-based filters.

When Rungate is the right choice

Your budgets need to span a workflow, not a key.

“This ticket resolution run can’t exceed $2, across every LLM call + every tool invocation + every retry” — that’s native in Rungate. In Portkey you’d issue a throwaway virtual key per workflow, which doesn’t work if the workflow spans multiple providers or agents.

You need human-in-the-loop approval for high-stakes actions.

When an agent tries to issue a refund over $500 or send a mass email, Rungate returns HTTP 202 and pauses the run. An approver reviews; on green, the agent’s next retry succeeds seamlessly. Portkey’s Guardrails block, log, or redact — they don’t pause and resume.

You need compliance-grade audit of complete workflows.

Reconstruct any workflow end-to-end: every call, every tool invocation, every retry, every approver, every cost, stitched together as one run. Portkey’s logs are per-request — you’d rebuild the workflow view yourself.

You want all governance on the free tier.

Rungate’s governance primitives — budgets, policies, approval gates — are free on every tier including the 500-step free plan. Portkey gates RBAC, guardrails, and alerts behind the $49/mo Production tier.

The architectural difference, in code

Both tools let you impose a budget cap. The difference is what unit it caps. Here’s the same scenario — an agent doing multi-step work, hitting a $1 budget — expressed in each.

# Portkey — virtual key model.
# Budget attaches to the key; the key is the unit of isolation.
# A workflow that spans multiple calls all use the same key —
# you can cap the key, but you can't cap the *workflow*.

from portkey_ai import Portkey

client = Portkey(
    api_key="PORTKEY_API_KEY",
    virtual_key="openai-vk-with-100usd-cap",  # budget on the key
)

# Each call in the workflow uses the same key.
# Portkey tracks cumulative spend per key, across all its calls.
# When the key hits its cap, the NEXT call fails.
r1 = client.chat.completions.create(...)   # ok
r2 = client.chat.completions.create(...)   # ok
# ... many calls later ...
rN = client.chat.completions.create(...)   # fails: key budget exceeded

The workaround in Portkey is to generate a new virtual key per workflow and rotate it when the workflow ends. It works for single-provider workflows but falls apart if your workflow spans providers (now you need multiple keys per workflow) or if you want budget to apply across agents working on a shared task.

Can you use both?

Yes, though not usually worth it. Both are in-series proxies, so you’d chain them — e.g., agent → Rungate (run-level governance) → Portkey (provider breadth + prompt mgmt) → provider. That works; the cost is one extra hop and two dashboards. In practice: pick the one whose central primitive matches what you care about. If it’s the run, Rungate. If it’s the platform surface area, Portkey.

Try Rungate

Apache 2.0 self-hosted today. Point your existing OpenAI or Anthropic SDK at https://api.rungate.dev/v1 with an rg_agt_* token. See the agent-native reference for code in Python, TypeScript, and curl.