scorpiox-openai ai-provider
Translates Anthropic Claude API requests into OpenAI-compatible format, allowing tools that speak the OpenAI protocol to use Claude models seamlessly.
linux-x64 linux-arm64 macos-arm64 windows-x64
🏗️ Architecture
OpenAI Client
chat/completions
→
scorpiox-openai
format translator
→
Anthropic API
messages endpoint
The proxy intercepts OpenAI-formatted requests (including streaming via SSE), translates message structures,
tool definitions, and system prompts into Anthropic's native format, then converts responses back.
This enables any tool built for the OpenAI API — including Codex CLI, Cursor, Continue, and other editors — to
use Claude models without code changes.
💻 Usage Examples
Start the proxy as a local server
$ scorpiox-openai
Point an OpenAI-compatible client at the proxy
$ export OPENAI_API_BASE=http://127.0.0.1:18020/v1
$ export OPENAI_API_KEY=sk-ant-xxxxx
$ curl http://127.0.0.1:18020/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{"model":"claude-sonnet-4-20250514","messages":[{"role":"user","content":"Hello"}]}'
{"id":"msg_...","object":"chat.completion","choices":[...]}
Use with Codex CLI (OpenAI's coding agent)
$ export OPENAI_BASE_URL=http://127.0.0.1:18020/v1
$ codex "Refactor this module to use async/await"
Streaming mode with Server-Sent Events
$ curl -N http://127.0.0.1:18020/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{"model":"claude-sonnet-4-20250514","stream":true,"messages":[{"role":"user","content":"Explain TCP"}]}'
Use with Python OpenAI SDK
import openai
client = openai.OpenAI(
base_url="http://127.0.0.1:18020/v1",
api_key="sk-ant-xxxxx",
)
response = client.chat.completions.create(
model="claude-sonnet-4-20250514",
messages=[{"role": "user", "content": "Write a Makefile"}],
)
print(response.choices[0].message.content)
Tool/function calling through the proxy
$ curl http://127.0.0.1:18020/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{"model":"claude-sonnet-4-20250514","messages":[{"role":"user","content":"What is the weather in Tokyo?"}],"tools":[{"type":"function","function":{"name":"get_weather","parameters":{"type":"object","properties":{"city":{"type":"string"}}}}}]}'