npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

codex-proapi

v1.0.8

Published

将 Codex (gpt-5.3-codex) 以 OpenAI 兼容 API 形式暴露,可在 Cline、Cursor 等客户端中使用。桌面版内置配置页,开箱即用。

Readme

Codex Pro API

Codex(gpt-5.3-codex)以 OpenAI 兼容 API 形式暴露,可在 Cline、Cursor 等支持 OpenAI 接口的客户端中使用。

For English, see README.md.


架构示意

Codex Pro API 架构图

客户端(Cline / Cursor 等)通过 OpenAI 兼容接口访问本服务,本服务使用已配置的 Codex 账号轮询请求并转发至 Codex 后端(chatgpt.com)。


演示说明

账号页 — 通过「使用 Codex 登录」添加账号(OAuth):

账号页

模型页 — 查看可用模型与额度:

模型页


如何开始使用

方式一:桌面版(推荐)

不想用命令行时,可直接安装桌面版:

  1. 打开 GitHub Releases
  2. 选择最新版本(如 v1.0.8),在 Assets 中下载 Windows 安装包Codex Pro API Setup x.x.x.exe(安装时可选路径、桌面/开始菜单快捷方式)。
    说明: 桌面版目前仅提供 Windows;macOS / Linux 用户请使用下方「命令行运行」方式。
  3. 安装并运行后,配置页会直接在软件窗口内打开,无需使用浏览器;关闭软件后,本地服务会随之关闭。账号与数据保存在您本机的用户数据目录,与安装目录分离。

方式二:命令行运行

需要 Node.js 18 或更高。在终端执行:

npm install -g codex-proapi
codex-proapi

或在项目目录执行 npm install 后运行 npm start。然后在浏览器打开 http://localhost:1455/。默认端口为 1455;全局安装时,账号与用量数据保存在 ~/.codex-proapi/

本地构建 Windows 安装包(开发者)

桌面版仅提供 Windows 安装包。在项目目录执行 npm run dist:win,输出在 release/ 目录。若出现「Cannot create symbolic link」错误,请以管理员身份运行终端,或开启开发者模式(设置 → 更新和安全 → 开发者选项)后重试。


在客户端中使用(Cline、Cursor 等)

| 配置项 | 填写内容 | |------------|----------| | Base URL | http://localhost:1455/v1(须含 /v1;若使用远程或其它端口,请改为对应地址 + /v1) | | 模型 | gpt-5.3-codex(或 gpt-5.2-codexgpt-5-codexgpt-5gpt-4) | | API Key | 任意填写(不校验;认证来自您已配置的 Codex 账号) |

操作步骤:

  1. http://localhost:1455/ 的「账号」页点击「使用 Codex 登录」添加账号(或使用「添加账号」→「粘贴 JSON」)。
  2. 在 Cline、Cursor 等客户端中按上表设置 Base URL(必须带 /v1)和模型,API Key 随意。
  3. 照常发起对话即可,代理会使用您配置的账号进行轮询。

登录时提示「地区限制」或 access_denied

若您点击「使用 Codex 登录」后出现地区限制access_denied 或类似提示,说明当前网络/地区无法使用该登录方式。您可以:

  1. 使用网络代理(VPN) 后再次点击「使用 Codex 登录」重试。
  2. 改用粘贴 auth.json:在能正常登录 Codex 的设备上(例如另一台电脑或已开代理的浏览器),打开 ~/.codex/auth.json(Windows:%USERPROFILE%\\.codex\\auth.json)复制全部内容,在本页「账号」→「添加账号」→「粘贴 JSON」中粘贴并添加。

页面上出现此类错误时也会显示上述操作说明。

挂了 VPN 仍显示「不支持的地区」怎么办?

若已开启 VPN 仍提示地区限制,可逐项排查:

  • 确保「登录页」也走代理:点击「使用 Codex 登录」后会跳转到 OpenAI 登录页,该页面的访问也必须走 VPN。若只有本机部分软件走代理、而浏览器未走代理,登录页仍会按你本机 IP 判定地区。请确认浏览器使用的是系统代理或全局代理,且代理已开启后再点登录。
  • 换节点或换 VPN:部分代理节点所在国家/地区可能仍被判定为非支持地区,或存在 IP/DNS 泄漏。可尝试更换节点(优先选美国等支持地区)或更换 VPN 服务后重试。
  • 优先改用「粘贴 auth.json」:在能正常登录 Codex 的环境(例如另一台已开代理的电脑、或同一台电脑上已用代理登录过 Codex 的浏览器),打开 ~/.codex/auth.json(Windows:%USERPROFILE%\\.codex\\auth.json),复制全部内容,回到本机 Codex Pro API 的「账号」→「添加账号」→「粘贴 JSON」中粘贴并添加,即可不依赖本机 OAuth 登录。

后端报 400 "Missing required parameter: tool..."

若接入 OpenCode 等带工具调用的客户端时出现 400Missing required parameter: 'tool...',多为请求里带了 tools/tool_choice 而后端格式要求不同。本服务已做兼容:无 tools 时会传 tool_choice: none。若仍报错,可在客户端侧暂时关闭「工具/函数调用」或使用仅对话模式再试。


请求接口返回 "fetch failed" / proxy_error

若调用 POST /v1/chat/completions 时返回 {"error":{"message":"fetch failed",...}},表示本服务无法连上 Codex 后端(chatgpt.com),请求在发出去之前就失败了。请逐项检查:

  1. 是否已添加账号:在配置页「账号」中至少添加一个 Codex 账号(OAuth 登录或粘贴 auth.json)。
  2. 本机能否访问 chatgpt.com:在浏览器或本机执行 curl -I https://chatgpt.com,若超时或被墙,需在本机或运行本服务的环境开启 VPN/代理 后再试(与「使用 Codex 登录」一样,请求 Codex 的流量也要走代理)。
  3. 桌面版:若用桌面版,请确保运行桌面版的那台电脑能访问 chatgpt.com(或在该电脑上开 VPN)。

通过他人提供的链接使用时出现 403

若您是通过别人提供的网址(如 https://xxx.com)打开本服务,在点击「使用 Codex 登录」最后一步时出现 403 或「Token exchange failed」等提示,属于服务端回调地址配置问题。请联系提供该链接的服务方检查域名与 OAuth 回调配置;您本地无需修改。


功能说明

  • 多账号轮询与故障切换 — 请求在您添加的多个账号间轮询;某账号失败时自动切换下一个。
  • 配置页 — 仪表盘、模型(额度)、账号(OAuth 登录 / 粘贴 JSON)、日志、设置(语言、Base URL)。数据每 5 秒自动刷新。
  • 响应式界面 — 支持桌面与手机;小屏下侧栏收起到菜单。
  • 中英双语 — 界面与日志支持英文与简体中文。

本服务支持多轮对话;在客户端按 OpenAI 格式传 messages 即可,代理会自动处理。


使用 free.violetteam.cloud 接收验证码

若使用 free.violetteam.cloud 接收验证邮件(如注册 ChatGPT/Codex 小号),验证码到达可能稍慢,请耐心等待。若长时间未收到,请点击重发验证码


License

MIT. 问题与建议可提交 GitHub Issues