Skip to main content
When developers use Claude Code or Codex individually, it works fine. When 100 developers use it — raw API keys get scattered, costs spike overnight without attribution, and there’s no fallback when a provider goes down. Portkey is the gateway that sits between your team’s coding agents and LLM providers. Developers change nothing. You get full control.

Secure

Centralize provider credentials. Issue scoped API keys per team. Rotate or revoke access without touching developer configs.

Control

Set hard budget and rate limits per developer, team, or workspace. Block requests when limits are hit.

Observe

Log every request — cost, tokens, latency, model, and who made it. Attribute spend by team or project.

Supported agents

Claude Code

The most widely deployed AI coding agent. Supports Anthropic direct, Bedrock, and Vertex AI through a single Portkey endpoint.

OpenAI Codex

OpenAI’s terminal coding agent. Configure via config.toml with full provider flexibility.

Cursor

Route Cursor’s AI requests through Portkey for observability and cost controls.

Cline

Set Portkey as Cline’s custom OpenAI base URL.

Roo Code

Drop-in Portkey integration via base URL override.

Goose, opencode & more

Any OpenAI-compatible coding agent works with Portkey.

What platform teams get

Access control

Developers never see provider credentials. Every request is authenticated through a scoped Portkey key.
GoalWhat to useDescription
Centralize credentialsModel CatalogStore Anthropic, Bedrock, and Vertex keys once. Issue scoped Portkey keys to teams — no raw key distribution.
Isolate teamsWorkspacesEach team gets its own workspace with separate budgets, rate limits, and provider access. One team’s usage never affects another’s.
Manage team accessAPI KeysOne key per developer or team. Rotate or revoke from one place without touching developer configs.
Provision access at scaleSSO / SCIMConnect your identity provider. Onboard and offboard developers automatically.

Cost management

Agentic loops are expensive. One uncapped session can rack up hundreds of dollars overnight.
GoalWhat to useDescription
Cap team spendingBudget PoliciesHard spend limits per developer, team, or workspace. Requests block when the limit is hit.
Prevent traffic starvationRate LimitsStop any single user from consuming shared provider capacity.
Attribute costs by teamLogs + MetadataEvery request logged with team, project, model, tokens, and exact cost. Answer spend questions in seconds.
Per-request cost breakdown and metadata filters in Portkey

Reliability

Coding agents fail silently when providers go down. Portkey routes around outages automatically.
GoalWhat to useDescription
Survive provider outagesFallbacksAuto-retry on Bedrock or Vertex if Anthropic goes down — no developer intervention.
Handle team-scale volumeLoad BalancingDistribute traffic across providers and API keys.

Governance

Coding agents operate with terminal-level access. Portkey adds the control layer.
GoalWhat to useDescription
Protect sensitive codebasesGuardrailsPII detection, prompt injection protection, and content filtering before requests hit the model.
Govern MCP tool accessMCP GatewayCentralized auth and full call logs for every MCP tool your agents use.
Maintain a compliance trailAudit LogsImmutable record of every access, config change, and policy action across the org.
Share coding standardsAgent SkillsVersion prompt instructions and sync them to every developer’s agent with one command.

Setting up Claude Code and Codex

For Claude Code and Codex, the Setup using CLI sets up gateway routing, MCP servers, and team skills in one command:
npx github:portkey-ai/agent-cli

Claude Code setup

Anthropic direct, Bedrock, and Vertex AI

Codex setup

Full config.toml reference and provider options

Next steps

Budget Policies

Hard spend limits per team or developer

Model Catalog

Centralized provider credentials and access controls

Configs

Fallbacks, load balancing, and routing strategies

MCP Gateway

Govern MCP tool access across your agent fleet

Observability

Logs, traces, and cost breakdowns for every session

Agent Skills

Sync team coding standards to every developer’s agent
Last modified on April 7, 2026