A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
This project converts the API of Anthropic's Claude model to the OpenAI Chat API format.
This project converts the API of Anthropic's Claude model to the OpenAI Chat API format.
claude-instant-1, claude-2 modelsYou can run this project using Cloudflare Workers or Docker:
By using Cloudflare Workers, you don't need a server to deploy this project.
cloudflare-worker.js to Cloudflare Worker "Quick Edit" EditorThe Cloudfalre Workers support 100k requests a day, If you need to call more than that, you can use Docker to deploy as below.
docker run -p 8000:8000 wtzeng/claude-to-chatgpt:latest
docker-compose up
The API will then be available at http://localhost:8000. API endpoint: /v1/chat/completions
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.
Here are some recommended GUI software that supports this project:
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!"}]
}'
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.
This project is licensed under the MIT License - see the LICENSE file for details.
干净、强大、属于你的 AI Agent 平台 --AI agents, without the clutter.
A Comprehensive Benchmark to Evaluate LLMs as Agents (ICLR'24)
Pocket Flow: Codebase to Tutorial
Native macOS app to monitor Claude AI usage limits and watch your coding sessions live