Skip to Content
MigrationsMigrate from Portkey to Curate-Me

Migrate from Portkey

Portkey was acquired by Palo Alto Networks in April 2026 (~$130M). The roadmap is now tied to Prisma AIRS, PAN’s AI security platform. If you need a gateway with an independent roadmap and managed runner support, this guide walks you through the move.

Migration time: 10–20 minutes. The base URL format is similar enough that existing SDK code changes are minimal.

Environment variable mapping

Portkey env varCurate-Me equivalentNotes
PORTKEY_API_KEYCM_API_KEY (cm_sk_...)Format changes; same role
PORTKEY_GATEWAY_URLOPENAI_BASE_URL=https://api.curate-me.ai/v1/openaiPer-provider path
OPENAI_API_KEY (virtual key)Store in Secrets → OPENAI_API_KEY=cm_sk_...Provider key stored server-side
PORTKEY_VIRTUAL_KEYReplaced by Curate-Me stored secrets
PORTKEY_CONFIGCM governance is per-org in the dashboard
PORTKEY_TRACE_IDAutomatic via X-CM-Trace-Id headerNo code change needed

Before / after code diff

-from portkey_ai import Portkey - -client = Portkey( - api_key="PORTKEY_API_KEY", - virtual_key="PORTKEY_VIRTUAL_KEY", -) -response = client.chat.completions.create( - messages=[{"role": "user", "content": "Hello"}], - model="gpt-4o", -) +from openai import OpenAI + +client = OpenAI( + base_url="https://api.curate-me.ai/v1/openai", + api_key="cm_sk_your_gateway_key", +) +response = client.chat.completions.create( + messages=[{"role": "user", "content": "Hello"}], + model="gpt-4o", +) print(response.choices[0].message.content)

With Portkey’s config header (if you use custom configs):

-headers = portkey.createHeaders( - api_key="PORTKEY_API_KEY", - config="pp-config-xxx", -) -client = OpenAI(api_key="OPENAI_API_KEY", default_headers=headers) +# CM governance config is set in the dashboard — no per-request header needed +client = OpenAI( + base_url="https://api.curate-me.ai/v1/openai", + api_key="cm_sk_your_gateway_key", +)

Step-by-step migration

Create a Curate-Me account and get your gateway key

Sign up at dashboard.curate-me.ai/signup . Go to Settings → API Keys → New Key. Copy the cm_sk_... value.

Import your Portkey virtual keys

The curate CLI can read a Portkey virtual key export and print the equivalent CM secret-store commands:

# Export your virtual keys from the Portkey dashboard first, then: curate import-portkey-config portkey-virtual-keys.json

Output example:

# Curate-Me equivalent of your Portkey virtual keys # Review and run these commands to set up provider secrets: curl -X POST https://api.curate-me.ai/v1/admin/secrets \ -H "X-CM-API-Key: $CM_API_KEY" \ -H "Content-Type: application/json" \ -d '{"provider": "openai", "secret": "sk-your-openai-key", "label": "migrated-from-portkey"}' curl -X POST https://api.curate-me.ai/v1/admin/secrets \ -H "X-CM-API-Key: $CM_API_KEY" \ -H "Content-Type: application/json" \ -d '{"provider": "anthropic", "secret": "sk-ant-your-key", "label": "migrated-from-portkey"}' export CM_API_KEY=cm_sk_your_gateway_key export OPENAI_BASE_URL=https://api.curate-me.ai/v1/openai

The CLI helper is a print-only stub — it prints commands but does not mutate any state. Review and run the output manually.

Migrate Portkey Configs to CM governance policies

Portkey’s “Config” objects map to Curate-Me governance policies:

Portkey Config featureCurate-Me equivalent
strategy: fallbackProvider failover (roadmap)
strategy: loadbalanceMulti-key load balancing (roadmap)
cache: {mode: simple}Response caching (roadmap)
retry: {attempts: 3}SDK-side retry via RetryPolicy in the Python SDK
budget.total_budgetPer-org daily budget in Costs → Budgets
metadata.userPer-request metadata via X-CM-User-Id header

Set a daily budget

curl -X POST https://api.curate-me.ai/v1/admin/budgets \ -H "X-CM-API-Key: cm_sk_your_gateway_key" \ -H "Content-Type: application/json" \ -d '{"daily_limit_usd": 50.0, "scope": "org"}'

Update your environment variables

# Remove Portkey vars unset PORTKEY_API_KEY unset PORTKEY_VIRTUAL_KEY unset PORTKEY_GATEWAY_URL # Add Curate-Me vars export CM_API_KEY=cm_sk_your_gateway_key export OPENAI_BASE_URL=https://api.curate-me.ai/v1/openai export OPENAI_API_KEY=cm_sk_your_gateway_key

Verify your first request

curl https://api.curate-me.ai/v1/openai/chat/completions \ -H "X-CM-API-Key: $CM_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4o", "messages": [{"role": "user", "content": "Migration test — what year is it?"}] }'

Check Dashboard → Traces for the new request trace with X-CM-Request-Id.

Portkey feature equivalents

Portkey featureCurate-Me equivalent
Virtual keysStored secrets (Settings → Provider Secrets)
Configs / routing strategiesGovernance policies (dashboard per-org)
Prompt playgroundDashboard → Playground
Prompt libraryComing soon
Logging (Portkey logs)Traces dashboard (full request/response)
Semantic cachingRoadmap
Provider fallbackRoadmap
Observability (Portkey analytics)Dashboard → Costs + Traces
Guardrails add-onBuilt-in PII scanning + content safety (no add-on)

Rollback

If you need to revert:

# Restore Portkey env vars export PORTKEY_API_KEY=your-old-portkey-key export PORTKEY_VIRTUAL_KEY=your-virtual-key unset OPENAI_BASE_URL # or restore to https://api.portkey.ai/v1 unset CM_API_KEY

Your provider secrets remain stored in Curate-Me and can be deleted via DELETE /v1/admin/secrets/{id} if you want a clean break.