Skip to Content
prxy.monster v1 is in early access. See what shipped →
MigrationMigrating from Portkey

Migrating from Portkey

Portkey ships a similar concept (gateway with plugins). prxy.monster differs in three areas: pipeline composability, local mode, and pricing.

What’s the same

  • Gateway sits between your app and the provider.
  • OpenAI- and Anthropic-compatible endpoints.
  • Caching, retries, fallbacks all available.
  • Observability via metadata + custom tags.

What’s different

Portkeyprxy.monster
Plugin systemConfigs (declarative)Modules (code, composable)
Local modeNoYes (single Docker container)
PricingPer-request, tieredFlat tier; BYOK; no token markup
Custom code at gatewayLimitedFull module SDK
Memory / persistent learningNopatterns module

Diff: env vars

- PORTKEY_API_KEY=pk-xxx - # Plus a header on every call: x-portkey-config={"id":"..."} + ANTHROPIC_BASE_URL=https://api.prxy.monster + ANTHROPIC_API_KEY=prxy_live_xxx + # Or for OpenAI shape: + OPENAI_BASE_URL=https://api.prxy.monster/v1 + OPENAI_API_KEY=prxy_live_xxx

Portkey requires a custom header (x-portkey-config) on every call. prxy.monster either uses your key’s stored pipeline config OR a per-request x-prxy-pipe header — your choice.

Mapping Portkey configs → prxy pipelines

Portkey config:

{ "strategy": { "mode": "fallback" }, "targets": [ { "provider": "anthropic", "virtual_key": "..." }, { "provider": "openai", "virtual_key": "..." } ], "cache": { "mode": "semantic", "max_age": 3600 } }

Equivalent prxy.monster pipeline (using v1.1 router for fallback):

pipeline: - semantic-cache: similarity: 0.85 ttlSeconds: 3600 - router: strategy: 'fallback' fallback_chain: [claude-sonnet-4-6, gpt-4o]

Mapping Portkey guardrails

Portkey ships built-in PII detection, profanity filters, etc., as guardrails. prxy.monster’s guardrails module (v1.1) covers the same ground:

guardrails: pii_redact: true profanity_block: false custom_patterns: ['/sk-[a-zA-Z0-9]{32,}/']

Switch in 60 seconds

# 1. Sign up at prxy.monster # 2. Copy your API key # 3. Replace Portkey env + headers with one BASE_URL change export ANTHROPIC_BASE_URL=https://api.prxy.monster export ANTHROPIC_API_KEY=prxy_live_xxx # 4. Set your pipeline once (env var or dashboard) export PRXY_PIPE='exact-cache,semantic-cache,cost-guard,patterns'

Your code doesn’t change. The custom header goes away.

What you gain

  • Local mode — run on your own hardware for sensitive workloads. Portkey is hosted-only.
  • Persistent memorypatterns learns from your specific use case, not just caches.
  • Composable modules in code — write a custom module instead of being constrained to declarative configs.
Last updated on