Proxy AI CLI tools through AI Gateway

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, AWS Bedrock, and Alibaba Cloud (DashScope)
  • Codex CLI: OpenAI
  • Qwen Code CLI: OpenAI and Alibaba Cloud (DashScope)

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.

Codex CLI

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

Qwen Code CLI

Qwen Code CLI is an AI-powered coding assistant that uses OpenAI-compatible endpoints. Proxy Qwen Code CLI requests through Kong AI Gateway to gain visibility into API usage, implement rate limiting, and centralize credential management.

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!