纯前端单页面工具,用来把 ChatGPT Web 登录 session JSON 转换成 CPA、sub2api、Cockpit Tools、9router、AxonHub 或 Codex-Manager 可导入 JSON。
Plus 号可以用此方式导入中转站使用;Free 号的 access token 不能用于调用接口。
本工具可用来解决 Codex OAuth 登录需要绑定手机的问题。Plus 账号通过 Web 登录后的 session 就能生成可导入中转站的账号 JSON 数据;这类数据没有 refresh_token,但 access_token 有效期通常足够长。
解释一下: plus激活前(free状态)或激活后(plus状态)获取的session在使用上没有区别(free时拿到的session, 激活plus后就可以调模型了),只是账号级别标识有点区别(标识为free or plus),不影响调模型。 换句话讲,不管你啥时候拿到的session, 用本项目转换导入中转站,只要账号当前激活了plus, 就能正常调模型接口。
本工具主要针对 Plus 账号适用,Free 账号即使转换了也没有权限调用 GPT 模型。GoPay 拉闸了,没法每天发 Plus 了;加入 Discord 频道免费获取 GPT 撸羊毛信息,然后配合本工具导入 CPA or Sub2API 使用。
邀请链接:https://discord.gg/GFmHY2TZNy
支持粘贴或拖入 ChatGPT Web session JSON,例如包含:
user.emailaccessTokensessionTokenexpiresaccount.idaccount.planType
也支持粘贴或拖入 9router Codex OAuth JSON,例如包含 accessToken、refreshToken、expiresAt、providerSpecificData.chatgptAccountId 和 providerSpecificData.chatgptPlanType。
也支持粘贴或拖入 AxonHub Codex auth.json,例如包含 tokens.access_token、tokens.refresh_token、tokens.id_token 和 last_refresh。
也支持粘贴或拖入 Codex-Manager 批量导入 JSON,例如包含 tokens.access_token、tokens.refresh_token、tokens.id_token 和 meta.label。
页面也会尝试从 accessToken 的 JWT payload 中补充邮箱、账号 ID、用户 ID、计划类型和过期时间。
CPA:生成 Codex CPA auth JSON,包含type: "codex"、access_token、session_token、id_token、email、account_id、套餐和过期时间等字段;缺少真实id_token时会根据 session 与 access token claims 构造 Codex 可解析的占位 JWT claims。sub2api:生成参考CPA2sub2API项目的exported_at/proxies/accounts结构,账号平台为openai,类型为oauth;每个账号对象包含expires_at和auto_pause_on_expired,其中expires_at来自该账号 access token 的 JWTexp秒级时间戳。Cockpit:生成 Cockpit Tools Codex JSON 导入可识别的扁平 token 格式,包含id_token、access_token、refresh_token、account_id、email、expired等字段。9router:生成 9router Codex OAuth JSON,包含accessToken、refreshToken、expiresAt、providerSpecificData、provider、authType、priority、isActive、createdAt和updatedAt等字段。AxonHub:生成 AxonHub Codex auth.json,包含auth_mode: "chatgpt"、last_refresh和tokens.access_token/refresh_token/id_token。缺少真实refresh_token时会写入__missing_refresh_token__占位值,方便在 access token 过期前试用;过期后不能自动刷新。Codex-Manager:生成 Codex-Manager 批量导入 JSON,包含tokens.access_token/refresh_token/id_token和meta.label/workspace_id/chatgpt_account_id/note。缺少真实refresh_token时保留空字符串,避免被 Codex-Manager 误判为可刷新账号。 ChatGPT Web session 通常不包含 OAuth 文件里常见的refresh_token,因此 access token 过期后不能自动刷新。
直接打开:
docs/index.html
所有解析和转换都在浏览器本地完成,不上传 token,不写入本地存储。