Claude Proxy icon

Claude Proxy

Converts Claude API requests into OpenAI API format using a Cloudflare Workers proxy, enabling seamless integration with OpenAI-compatible clients.

关于

This TypeScript project provides a proxy server deployed on Cloudflare Workers, designed to bridge the gap between Claude and OpenAI APIs. It seamlessly converts requests formatted for the Claude API (`/v1/messages` endpoint) into the structure required by the OpenAI API. This allows existing Claude-compatible clients, such as the Claude Code CLI, to effectively communicate with any service that supports the OpenAI API format, including dynamic routing to various endpoints and automatic tool calling conversion for broader compatibility.

主要功能

  • Dynamic routing to any OpenAI-compatible API endpoint via request URL
  • Full Claude API `/v1/messages` compatibility, supporting streaming and non-streaming responses
  • Automatic conversion of Claude's `tools` format to OpenAI's, with input schema cleaning
  • Pre-configured fixed routes for Haiku models using environment variables
  • Simplified local setup and configuration for Claude Code CLI via a dedicated script
  • 0 GitHub stars

使用案例

  • Enable Claude API-compatible clients (e.g., Claude Code CLI) to interact with OpenAI API services
  • Integrate Claude's tool calling features with strict OpenAI-compatible APIs like Google Gemini
  • Streamline local development and configuration for AI model access
Claude Proxy: Seamless Claude to OpenAI API Conversion