[LIVE] [jqueguiner/claude-openai-proxy] 1 endpoint(s)
ChatGPT
API Proxy/ChatGPT
2,122 characters
Status: [LIVE]
Endpoints found:
https://openrouter.ai/api/v1
Source: https://github.com/jqueguiner/claude-openai-proxy
# claude-openai-proxy
A small Rust proxy that translates between the **Anthropic Messages API** and the
**OpenAI Chat Completions API**, in both directions, in one binary:
```
Claude Code / Hermes (Anthropic mode) ──(/v1/messages)──────────▶ proxy ──(/v1/chat/completions)──▶ vLLM, Ollama, OpenRouter, ...
Hermes / any OpenAI client ───────────(/v1/chat/completions)──▶ proxy ──(/v1/messages)───────────▶ api.anthropic.com (Claude Code login)
```
1. **Anthropic → OpenAI**: run Claude Code (or any Anthropic-API client) on top of any
OpenAI-compatible server — vLLM, llama.cpp, Ollama, LM Studio, SGLang, OpenRouter, LiteLLM, ...
2. **OpenAI → Anthropic**: give any OpenAI-compatible client (Hermes Agent, LangChain, the
`openai` SDK, ...) access to Claude — Fable 5.1, Opus 5, Sonnet 5, ... — using an API key or
**your Claude Code login (OAuth, Max/Pro plan)**.
## OpenAI → Claude (`/v1/chat/completions`)
Point any OpenAI client at `http://127.0.0.1:8082/v1` with any dummy key and ask for a Claude
model (`claude-fable-5-1`, `anthropic/claude-fable-5.1`, `claude-opus-5`, ...; non-Claude names
fall back to `CHAT_DEFAULT_MODEL`).
Credentials, in order: `ANTHROPIC_API_KEY` → `CLAUDE_CODE_OAUTH_TOKEN` (from `claude setup-token`)
→ **Claude Code's own login** (macOS keychain `Claude Code-credentials`, else
`~/.claude/.credentials.json`) → the client's bearer token if it is an `sk-ant-…` secret. The
stored login is read on every request (30 s cache) so it follows Claude Code's own refreshes; the
proxy never refreshes tokens itself (that would rotate Claude Code's refresh token). If the token
is expired, run `claude` once.
With an OAuth token the proxy sends what Claude Code sends (`Authorization: Bearer`,
`anthropic-beta: claude-code-20250219,oauth-2025-04-20`, `user-agent: claude-code/<version>
(external, cli)`, `x-app: cli`, and the `You are Claude Code…