diff --git a/integrations/libraries/claude-code.mdx b/integrations/libraries/claude-code.mdx index d22c7a3b..0d1a3029 100644 --- a/integrations/libraries/claude-code.mdx +++ b/integrations/libraries/claude-code.mdx @@ -3,6 +3,31 @@ title: 'Claude Code' description: 'Integrate Portkey with Claude Code for enterprise-grade AI coding assistance with observability, reliability, and governance' --- +### Universal provider (any model like gpt5.2, grok, kimi, etc) + +You can use Claude Code with any model available through Portkey while keeping the same Anthropic-style `settings.json` structure. + +Use the same setup as Anthropic, then swap: + +- `x-portkey-provider` in `ANTHROPIC_CUSTOM_HEADERS` to your provider slug (for example, `@openai-prod`, `@xai-prod`, `@moonshot-prod`, etc.) +- `ANTHROPIC_MODEL` to your target model ID + +```json +{ + "env": { + "ANTHROPIC_BASE_URL": "https://api.portkey.ai", + "ANTHROPIC_AUTH_TOKEN": "YOUR_PORTKEY_API_KEY", + "ANTHROPIC_CUSTOM_HEADERS": "x-portkey-api-key: YOUR_PORTKEY_API_KEY\nx-portkey-provider: @your-provider", + "ANTHROPIC_MODEL": "$YOUR_MODEL" + }, + "model": "$YOUR_MODEL" +} +``` + + +`codex-5.3` models are currently not supported. Codex models require a Responses endpoint adapter, which is coming soon. + + [Claude Code](https://code.claude.com/docs/en/overview) is one of the most popular AI coding tools for boosting developer productivity. Platform teams use Portkey to roll out Claude Code across their organization—without handing out raw API keys or losing visibility into usage. ## Why Platform Teams Use Portkey