Claude2openai — Development skill for Claude Code
Convert the Claude API to OpenAI compatible API.
How to install Claude2openai
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open missuo/claude2openai and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude2openai does
Convert the Claude API to OpenAI compatible API.
Alternatives in Development
- Package OfficeCLI Skill As AionUi Assistant — Convert an OfficeCLI skill into a fully wired AionUi assistant preset, or update an existing one 20.3k ★
- Imagegen — Generate and edit images using OpenAI's Image API for projects 14.6k ★
- Gcli2api — 将 GeminiCLI 和 Antigravity 转换为 OpenAI 、GEMINI 和 Claude API 接口 4.6k ★
README
Claude2OpenAI
Used to convert the Claude API to OpenAI compatible API. **Easily use Claude with any OpenAI compatible client.**
Compatibility
Currently it is only compatible with the Claude-3 family of models, if you pass in any other model, the default will be to use **claude-3-5-haiku-20241022**.
You can customize the list of allowed models by setting the `ALLOWED_MODELS` environment variable with a comma-separated list of model names. This is useful when new Claude models are released, allowing you to add support without rebuilding:
# Example: Setting custom allowed models
export ALLOWED_MODELS="claude-3-5-haiku-20241022,claude-3-5-sonnet-20241022,claude-3-haiku-20240307"
The first model in the list will be used as the default model.
Request Example
curl http://127.0.0.1:6600/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-ant-xxxxxxxxxxxxxxxx" \
-d '{
"model": "claude-3-5-haiku-20241022",
"messages": [
{
"role": "system",
"content": "翻译为中文!"
},
{
"role": "user",
"content": "Hello!"
}
],
"stream": true
}'
Features
Image Support
Claude2OpenAI supports images in the same format as OpenAI. You can include images in your messages using either base64-encoded images or URLs.
curl http://127.0.0.1:6600/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-ant-xxxxxxxxxxxxxxxx" \
-d '{
"model": "claude-3-5-sonnet-20241022",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What's in this image?"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/image.jpg"
}
}
]
}
]
}'
Debug Mode
You can enable debug mode to help troubleshoot issues:
- Using an
Related Skills
Claude Code API
OpenAI-compatible API gateway for Claude Code CLI.
Claude Code API Rs
A high-performance Rust implementation of an OpenAI-compatible API gateway for Claude Code CLI.
Openapis
Free Claude API + free OpenAI API in one unified proxy. Drop-in compatible with Anthropic SDK, OpenAI SDK, Cla
CLIProxyAPI Rust
Your Claude, ChatGPT and Gemini subscriptions as one fast API. A single Rust binary with OpenAI, Anthropic and
Claudeme
ClaudeMe - 终端里的另一个你。基于 Claude Code,支持任意 OpenAI Compatible API,多厂商多模型,零确认开干。不只是编程工具,是你的赛博分身。 Your digital twin
Cursor2api
Use your Cursor subscription as an OpenAI-compatible API. Direct agent.v1 protocol — real tool_calls, streamin
Related Agents
AI Recon
Delegates to this agent when the user wants to map the AI attack surface of an authorized web application befo
Lmstudio Local
A locally-hosted model served through LM Studio's OpenAI-compatible API,
Fable5 Apfel Engineer
Heavy-lifting Fable-5 engineer for the apfel project (Apple on-device FoundationModels CLI + OpenAI-compatible