Proxy AI CLI tools through Kong AI Gateway

Kong AI Gateway can proxy requests from AI command-line tools to LLM providers. This gives you centralized control over AI traffic: log all requests, track costs across teams, enforce rate limits, or apply security policies and guardrails.

Supported AI CLI tools:

  • Claude Code: Anthropic, OpenAI, Azure OpenAI, Google Gemini, Google Vertex, AWS Bedrock, and Alibaba Cloud (Dashscope)
  • Codex CLI: OpenAI

Current limitations:

  • Load balancing or failover features currently only work if all providers share the same model identifier.
  • Streaming is not supported when using non-Claude models with the following providers: Azure OpenAI, Google Gemini, and AWS Bedrock. Token usage might be reported as 0, but otherwise functionality is not affected.

Claude Code

Claude Code is Anthropic’s command-line tool that delegates coding tasks to Claude AI. Route Claude Code requests through Kong AI Gateway to monitor usage, control costs, and enforce rate limits across your development team.

Codex CLI

Codex CLI is OpenAI’s command-line tool for code generation and assistance. Proxy Codex CLI requests through Kong AI Gateway to gain visibility into API usage, implement rate limiting, and centralize credential management.

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!