claudeers.
// Other

claude-to-chatgpt

This project converts the API of Anthropic's Claude model to the OpenAI Chat API format.

// Other[ cli ][ api ][ web ][ claude ]#claude#anthropic#chatgpt#claude-ai#openai#otherMIT$open-sourceupdated 2 months ago
Dormant
0/100
last commit about 2 years ago
last release about 3 years ago
releases 9
open issues 12
// star history

Install with your AI

Paste into Claude Code, Cursor, or any agent — it reads the repo and wires the tool into your project.

⚠ Unverified source (community-unclaimed, low activity) — reveal the prompt
⚠ Unverified source (community-unclaimed, low activity). Inspect the repo before letting your agent install it.

Install and set up claude-to-chatgpt (git-clone project) into my current project.
Found on https://claudeers.com/claude-to-chatgpt
Repo: https://github.com/jtsang4/claude-to-chatgpt
Homepage/docs: —
Detected install method: git-clone → git clone https://github.com/jtsang4/claude-to-chatgpt
Category: other. Platforms: cli, api, web.
Read the repo's README for exact setup and env vars, then install it and wire it into my project.

Claudeers Health Verdict:
dormant; community-verified: false. Confirm the source before running anything.
// or clone · unverified · not recently updated
git clone https://github.com/jtsang4/claude-to-chatgpt

// compatibility

Platformscli, api, web
Operating systems
AI compatibilityclaude
LicenseMIT
Pricingopen-source
LanguagePython

English | 简体中文 | 日本語

Claude to ChatGPT

This project converts the API of Anthropic's Claude model to the OpenAI Chat API format.

  • ✨ Call Claude API like OpenAI ChatGPT API
  • 💦 Support streaming response
  • 🐻 Support claude-instant-1, claude-2 models
  • 🌩️ Deploy by Cloudflare Workers or Docker

Getting Started

You can run this project using Cloudflare Workers or Docker:

Deployment

Using Cloudflare Workers

By using Cloudflare Workers, you don't need a server to deploy this project.

  1. Create a Cloudflare Worker
  2. Paste the code in cloudflare-worker.js to Cloudflare Worker "Quick Edit" Editor
  3. Save and deploy
  4. (Optional) Set custom domain for your Cloudflare Worker

The Cloudfalre Workers support 100k requests a day, If you need to call more than that, you can use Docker to deploy as below.

Using Docker

docker run -p 8000:8000 wtzeng/claude-to-chatgpt:latest

Using Docker Compose

docker-compose up

The API will then be available at http://localhost:8000. API endpoint: /v1/chat/completions

Usage

When you input the model parameter as gpt-3.5-turbo or gpt-3.5-turbo-0613, it will be substituted with claude-instant-1. otherwise, claude-2 will be utilized.

GUI

Here are some recommended GUI software that supports this project:

CLI

curl http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $CLAUDE_API_KEY" \
  -d '{
    "model": "gpt-3.5-turbo",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Conversion Details

The Claude Completion API has an endpoint /v1/complete which takes the following JSON request:

{
  "prompt": "\n\nHuman: Hello, AI.\n\nAssistant: ",
  "model": "claude-instant-1",
  "max_tokens_to_sample": 100,
  "temperature": 1,
  "stream": true
}

And returns JSON with choices and completions.

The OpenAI Chat API has a similar /v1/chat/completions endpoint which takes:

{
  "model": "gpt-3.5-turbo",
  "messages": [
    {
      "role": "user",
      "content": "Hello, AI."
    }
  ],
  "max_tokens": 100,
  "temperature": 1,
  "stream": true
}

And returns JSON with a response string.

This project converts between these two APIs, get completions from the Claude model and formatting them as OpenAI Chat responses.

License

This project is licensed under the MIT License - see the LICENSE file for details.

// faq

What is claude-to-chatgpt?

This project converts the API of Anthropic's Claude model to the OpenAI Chat API format.. It is open-source on GitHub.

Is claude-to-chatgpt free to use?

claude-to-chatgpt is open-source under the MIT license, so it is free to use.

What category does claude-to-chatgpt belong to?

claude-to-chatgpt is listed under data in the Claudeers registry of Claude-compatible tools.

0 views
1,297 stars
unclaimed
updated 2 months ago

// embed badge

claude-to-chatgpt on Claudeers
[![Claudeers](https://claudeers.com/api/badge/claude-to-chatgpt.svg)](https://claudeers.com/claude-to-chatgpt)

// retro hit counter

claude-to-chatgpt hit counter
[![Hits](https://claudeers.com/api/counter/claude-to-chatgpt.svg)](https://claudeers.com/claude-to-chatgpt)

// reviews

// guestbook

0/500

// related in Other

🔓

符合nature论文学术表达和科研绘图的Skill

// otherYuan1z0825/Python36,535Apache-2.0[ claude ]
🔓

Open source Ghostty-based macOS terminal with vertical tabs and notifications for AI coding agents. Built for multitasking, organization, and programmability.

// othermanaflow-ai/Swift26,069NOASSERTION[ claude ]
🔓

Anti-AI-slop design skill for Claude Code, Cursor, and Codex.

// otherNutlope/CSS25,307MIT[ claude ]
🔓

Huashu Design · HTML-native design skill for Claude Code · Claude Code 里 HTML 原生的设计 skill · 高保真原型 / 幻灯片 / 动画 + 20 设计哲学 + 5 维评审 + MP4 导出 · Agent-agnostic

// otheralchaincyf/HTML23,151MIT[ claude ]

// built by

1 of its contributors also build on official projectsclaude-cookbooks, claude-quickstarts

→ see how claude-to-chatgpt connects across the ecosystem