Connect Claude Desktop to Portkey Gateway in under five minutes. Route requests through your org’s approved providers with metadata, policies, and full observability.
This guide takes you from a fresh Claude Desktop install to a fully-routed connection through Portkey in about five minutes. After setup, every conversation flows through your organization’s gateway with approved model routing, policy enforcement, and cost tracking.
Requirements: Claude Desktop with third-party inference support (any recent build from late 2025 onward). If you don’t see Configure third-party inference under the Developer menu after enabling Developer mode, update the app from claude.ai/download.
Your Portkey API key is expired, revoked, or scoped to a different workspace. Get a fresh key from your admin or generate one yourself at API Keys.
Why aren't my requests appearing in Logs?
Three things to check:
Base URL is correct: https://api.portkey.ai for Portkey SaaS, or your org’s self-hosted gateway URL. No trailing slash, no /v1.
Auth scheme is set to bearer.
You fully quit and relaunched Claude Desktop after applying settings (not just closed the window).
Why isn't my policy applying?
Metadata JSON must be valid (no trailing commas, no single quotes). Key names are case-sensitive and must exactly match what your admin configured in the policy rules.
Why is the wrong model responding?
Model routing is controlled by your admin’s config in Portkey. If you’re getting unexpected model behavior, your team’s config likely points to a different model than you expect. Check with your platform team.
Why doesn't Configure third-party inference appear in my menu?
Either Developer mode isn’t enabled (check Help → Troubleshooting), or your Claude Desktop build predates third-party inference support. Update the app from claude.ai/download.
Yes. The menu paths differ slightly (covered in Step 1) but the gateway settings and headers are identical.
Can I still use Claude Cowork while routed through Portkey?
Yes, but Cowork has its own configuration surface inside Claude Desktop. See the Claude Cowork guide for the Cowork-specific setup.
Will routing through Portkey slow down responses?
Portkey adds single-digit milliseconds of overhead per request. You won’t notice it during normal use.
What happens if Portkey is unreachable?
Claude Desktop will surface the connection error like any other API failure. If your admin configured fallbacks in the Portkey config, traffic automatically routes to a backup provider before that happens.
Can I use this with a personal Claude account?
Yes. Third-party inference is a Claude Desktop setting independent of your account type. Your platform admin can issue you a personal-scoped API key for pilot or solo use.
Does Claude Desktop store my Portkey API key securely?
Claude Desktop stores third-party inference credentials in the OS keychain (macOS Keychain or Windows Credential Manager).
My org runs Portkey on-prem. What URL do I use?
Your admin will give you the gateway URL for your self-hosted deployment. It will not be api.portkey.ai. Everything else in this guide stays the same: same auth scheme, same metadata header, same setup flow.