[UNTESTED] [sanjeevpenupala/claude-code-openai-proxy] 1 endpoint(s)
ChatGPT
API Proxy/ChatGPT
2,144 characters
Status: [LIVE]
Endpoints found:
https://docs.claude.com/en/api/agent-sdk
Source: https://github.com/sanjeevpenupala/claude-code-openai-proxy
# Claude Code OpenAI Proxy
A local shim that lets any app expecting an OpenAI-compatible endpoint route its LLM calls through your [Claude Code](https://docs.claude.com/en/docs/claude-code) subscription instead, with no `ANTHROPIC_API_KEY` required. I built it for [Meetily](https://github.com/Zackriya-Solutions/meeting-minutes).
Tools with native Claude Code integration (Cline, Cursor, Zed, Aider) don't need this. They speak the [Agent SDK](https://docs.claude.com/en/api/agent-sdk) directly. This is for the apps that only speak OpenAI HTTP.
## Architecture
```mermaid
flowchart TD
A["OpenAI-endpoint client<br/><i>e.g. Meetily</i>"]
B["claude-code-openai-proxy :3456<br/><i>FastAPI, loopback only</i>"]
C["Claude Code CLI<br/><i>claude -p --model ...</i>"]
D["Anthropic"]
A -->|"HTTP POST /v1/chat/completions<br/>(OpenAI-format JSON)"| B
B -->|"subprocess via stdin"| C
C -->|"OAuth<br/>(Claude Max, Agent SDK credits)"| D
```
## Prerequisites
- [uv](https://github.com/astral-sh/uv)
- [Claude Code CLI](https://docs.claude.com/en/docs/claude-code)
- Any OS that runs both of the above
- The optional [background service](#run-as-a-background-service-optional) is macOS-only (launchd)
## Setup
```bash
git clone https://github.com/sanjeevpenupala/claude-code-openai-proxy.git
cd claude-code-openai-proxy
uv sync # populates .venv/
uv run poe run # serves on 127.0.0.1:3456
```
Smoke test from another shell:
```bash
curl -s http://127.0.0.1:3456/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"claude-sonnet-4-6","messages":[{"role":"user","content":"Reply OK"}]}'
```
Ctrl-C when you're done.
### Tasks
Run any of these with `uv run poe <task>`:
| Task | What it does |
| -------- | --------------------------------------------------- |
| `run` | Serves the proxy on `127.0.0.1:3456` |
| `dev` | Same as `run` with `--reload` for live code