Why Platform Teams Use Portkey
Governance & Access Control
No raw API keys. Create a single config, add team members to workspaces, and enable Claude Code instantly. Track who’s using what.
Cost Visibility
Claude Code can run up bills fast with agentic loops. See exactly what each team, project, or developer is spending—and set hard budget limits.
Workspace Separation
Isolate teams with separate workspaces. Each gets its own budget, rate limits, and access controls. Perfect for enterprise multi-team setups.
Provider Agnostic
Route through Anthropic, Bedrock, or Vertex AI. Switch providers with a single config change—no developer workflow changes needed.
Important: Always use the latest version of Claude Code. Older versions may not work with Portkey’s gateway.
Choose Your Provider
Anthropic Direct
Route through Anthropic’s API directly. Includes Max plan and OAuth support.
Amazon Bedrock
Use Claude through AWS Bedrock with cross-region inference support.
Google Vertex AI
Use Claude through Google Cloud’s Vertex AI platform.
How It Works
Portkey acts as an LLM gateway between Claude Code and your chosen provider. All requests route through Portkey’s unified endpoint, giving you:ANTHROPIC_BASE_URL endpoint for all providers. You don’t need provider-specific URLs like ANTHROPIC_BEDROCK_BASE_URL or ANTHROPIC_VERTEX_BASE_URL.
Quick Start (All Providers)
The configuration pattern is the same for all providers — only the provider slug and model names change:Why Use Portkey with Claude Code?
Cross-Provider Fallbacks
Never lose a coding session due to provider outages. Configure automatic failover:Budget Controls for Agentic Coding
Claude Code can run expensive agentic loops. Set hard limits:- Cost limits: Maximum spend per day/week/month
- Token limits: Maximum tokens consumed
- Rate limits: Requests per minute/hour
Full Session Observability
Track every request in your coding session:- Request/response logs with full context
- Token usage and cost breakdowns
- Latency metrics
- Trace IDs for grouping related requests
Caching
Reduce costs and latency for repeated queries (common in iterative coding):Common Configuration
Forward Headers (Required)
Some Claude Code features need theanthropic-beta header forwarded. Add this to your Portkey Config:
Trace IDs
Group requests by session or project:Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
API Error: 500 fetch failed | Wrong base URL | Use https://api.portkey.ai (no /v1) |
| Lightning symbol (⚡) in logs | Passthrough request | Check provider slug and API key |
| Requests not appearing | Old Claude Code version | Run claude update |

