API conversion tool for Claude models to OpenAI Chat API format
Top 31.4% on sourcepulse
This project provides a compatibility layer that allows applications designed for the OpenAI ChatGPT API to interact with Anthropic's Claude models. It targets developers and users who want to leverage Claude's capabilities within existing OpenAI-compatible workflows, offering a seamless integration path and supporting streaming responses.
How It Works
The project acts as a proxy, intercepting requests formatted for the OpenAI Chat API and translating them into the format required by Claude's Completion API. It handles model name mapping (e.g., gpt-3.5-turbo
to claude-instant-1
or claude-2
) and converts the response structure to match OpenAI's output, including support for streaming. This approach enables easy adoption without modifying client applications.
Quick Start & Requirements
cloudflare-worker.js
into a Cloudflare Worker.docker run -p 8000:8000 wtzeng/claude-to-chatgpt:latest
or docker-compose up
.CLAUDE_API_KEY
.Highlighted Details
claude-instant-1
and claude-2
models.Maintenance & Community
The project is maintained by jtsang4. Community support channels are not explicitly mentioned in the README.
Licensing & Compatibility
Limitations & Caveats
The project relies on specific model name mappings for Claude, which might require updates if Anthropic changes its API or model naming conventions. Cloudflare Workers deployment has a daily request limit.
11 months ago
1 day