claude-max-api-proxy 是一個社群工具,可將你的 Claude Max/Pro 訂閱公開為 OpenAI 相容的 API 端點。這讓你能在任何支援 OpenAI API 格式的工具中使用你的訂閱。Documentation Index
Fetch the complete documentation index at: https://docs.openclaw.ai/llms.txt
Use this file to discover all available pages before exploring further.
為什麼使用這個?
| 做法 | 成本 | 最適合 |
|---|---|---|
| Anthropic API | 按 token 付費(Opus 約 75/M 輸出) | 生產應用程式、高用量 |
| Claude Max 訂閱 | 每月固定 $200 | 個人使用、開發、無限制使用 |
運作方式
- 在
http://localhost:3456/v1/chat/completions接受 OpenAI 格式的請求 - 將它們轉換為 Claude Code CLI 命令
- 以 OpenAI 格式回傳回應(支援串流)
開始使用
內建目錄
| Model ID | 對應至 |
|---|---|
claude-opus-4 | Claude Opus 4 |
claude-sonnet-4 | Claude Sonnet 4 |
claude-haiku-4 | Claude Haiku 4 |
進階設定
Proxy-style OpenAI-compatible notes
Proxy-style OpenAI-compatible notes
此路徑使用與其他自訂
/v1 後端相同的代理式 OpenAI 相容路由:- 不套用原生僅限 OpenAI 的請求塑形
- 沒有
service_tier、沒有 Responsesstore、沒有提示快取提示,也沒有 OpenAI reasoning 相容酬載塑形 - 隱藏的 OpenClaw 歸因標頭(
originator、version、User-Agent) 不會注入到代理 URL 上
Auto-start on macOS with LaunchAgent
Auto-start on macOS with LaunchAgent
建立 LaunchAgent 以自動執行此代理:
連結
- npm: https://www.npmjs.com/package/claude-max-api-proxy
- GitHub: https://github.com/atalovesyou/claude-max-api-proxy
- Issues: https://github.com/atalovesyou/claude-max-api-proxy/issues
備註
- 這是一個社群工具,並非由 Anthropic 或 OpenClaw 官方支援
- 需要有效的 Claude Max/Pro 訂閱,且 Claude Code CLI 已完成驗證
- 此代理在本機執行,不會將資料傳送到任何第三方伺服器
- 完整支援串流回應
若要使用 Claude CLI 或 API 金鑰進行原生 Anthropic 整合,請參閱 Anthropic provider。若要使用 OpenAI/Codex 訂閱,請參閱 OpenAI provider。
相關
Anthropic provider
透過 Claude CLI 或 API 金鑰與 OpenClaw 原生整合。
OpenAI provider
適用於 OpenAI/Codex 訂閱。
Model selection
所有提供者、模型參照與容錯移轉行為的概覽。
Configuration
完整設定參考。