Portkey vs SemanticGuard
Portkey is a multi-provider routing and observability gateway. SemanticGuard is an intelligent cache with 100% measured correctness. Here is where each fits, and how to run them together.
| Dimension | Portkey | SemanticGuard | Better fit |
|---|---|---|---|
| Primary job | Multi-provider routing, fallbacks, observability | Intelligent caching with verified correctness | Both fit |
| Semantic cache (paraphrases hit) | Exact-match cache; semantic is not the core focus | Yes, with correctness verified on every served hit | SemanticGuard |
| Correctness measurement | N/A (not a caching product) | 100% measured on public benchmark, methodology disclosed at /benchmark | SemanticGuard |
| Provider failover and load balancing | Core strength: ordered fallbacks, retries, load balancing across providers | Not offered today (on the roadmap) | Portkey |
| Prompt library and versioning | Yes, first-class | Not offered | Portkey |
| Shadow mode (see savings before enabling) | N/A | Default. Install and watch "would have saved $X" for a week before flipping cache on | SemanticGuard |
| Self-host in your own cloud tenant | Available as a self-hosted deployment | One-click install deploys into your own Vercel account. Prompts and cache stay in your tenant | Both fit |
| Fail-open design | Yes | Yes. If the cache is down, requests pass straight to the provider | Both fit |
| Pricing model at scale | Per-request tiered pricing | $49/mo Pro, or 15% of documented savings on Enterprise ($500/mo minimum). Pays for itself when caching works | SemanticGuard |
Comparison written 2026-07-01 against publicly documented product scope. Send corrections to hello@semanticguard.dev.
The two products live at different layers of your LLM app. Running them together is the norm, not the exception.
import { withSemanticGuard } from "@semanticguard/ai-sdk";import { createOpenAI } from "@ai-sdk/openai";const openai = createOpenAI({apiKey: process.env.OPENAI_API_KEY!,fetch: withSemanticGuard({gatewayUrl: "https://semanticguard.dev",apiKey: process.env.SG_API_KEY!,}),});// Cached responses return in under 50ms with verified correctness.// Cache miss? Passes straight through to the provider. Fail-open by design.
Free tier includes 10K requests/mo with Shadow Mode. See your potential savings before enabling caching. Nothing changes in your app until you flip it on.