ArcheMind

Claude OpenAI Bridge — Development skill for Claude Code

Development community

Yet another claude2openai.

How to install Claude OpenAI Bridge

This entry records only its repository, not the path inside it, so there is no exact command to give. Open ArcheMind/claude-openai-bridge and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Claude OpenAI Bridge does

Yet another claude2openai. Lazy, zero-copy, fast Python adapter that allows you to interact with Anthropic's Claude API using OpenAI API clients.

Alternatives in Development

  • Deep Research From Scratch — Deep research has broken out as one of the most popular agent applications 768 ★
  • Dario — A local OpenAI- and Anthropic-compatible proxy that brings your Claude Pro/Max subscription to Cursor, Cline 485 ★
  • KiroGate — OpenAI & Anthropic 兼容的 Kiro IDE API 代理网关,支持 Claude Code CLI 393 ★

README

Claude-OpenAI-Bridge

[中文版本](README_zh.md)

Claude-OpenAI-Bridge is an efficient Python adapter that allows you to interact with Anthropic's Claude API using OpenAI API clients. It provides a proxy server that converts OpenAI API requests to Claude API requests and transforms Claude's responses back to OpenAI format.

Features

  • Support for OpenAI chat completion API format
  • Streaming response support
  • Text and image input support
  • Automatic conversion between Claude and OpenAI message formats
  • Efficient request forwarding using asyncio and lazy modification techniques
  • Minimalist implementation, easy to extend and customize

Installation

One-click execution with uvx

[uvx](https://github.com/astral-sh/uv) is a fast Python package manager and installer. You can use uvx to run Claude-OpenAI-Bridge with a single command, without prior installation:

uvx claude-openai-bridge

Or specify host and port:

HOST=0.0.0.0 PORT=8080 uvx claude-openai-bridge

Usage

Using OpenAI Client

Once the server is running, you can connect to it using any OpenAI client by setting the base URL to your server address and the API key to your Anthropic API key.

Python example:

from openai import OpenAI

client = OpenAI(
    api_key="your-anthropic-api-key",  # Use your Anthropic API key
    base_url="http://localhost:8080/v1"  # Point to your Claude-OpenAI-Bridge server
)

response = client.chat.completions.create(
    model="claude-3-opus-20240229",  # Use Claude model name
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello, how are you?"}
    ]
)

print(response.choices[0].message.content)

Supported Models

You can use any Claude model by specifying the corresponding model name in your request:

  • claude-3-opus-20240229
  • claude-3-sonnet-20240229
  • claude-3-haiku-20240307
  • ...

Notes

  • You need a valid Anthropic API key
  • Some OpenAI-speci