0.One-API: https://github.com/songquanpeng/one-api
OpenRouter: https://openrouter.ai/ 有提供 Claude 之类的接口
1.实测可以配置一下 Caddy 或者其他的反向代理比如 Nginx,让 Caddy 来反代 OpenRouter,加上那边需要的两个头:
Caddyfile
openrouter-api.*.com {
tls /etc/caddy/ssl/*.com_server.crt.pem /etc/caddy/ssl/*.com_server.key.pem
reverse_proxy https://openrouter.ai {
header_up Host openrouter.ai
header_up HTTP-Referer "https://oneapi.*.com"
header_up X-Title "One API"
}
}