Skip to content

About

100% Pure-Protocol TokenHarbor Registration & Free-Route OpenAI API Key Tool (Powered by RegisterHub)

Resources

Stars

9 stars

Watchers

0 watching

Forks

Repository files navigation

TokenHarbor Register

TokenHarbor 100% 纯协议注册、免费模型路由解锁与 OpenAI 兼容 API Key (thk_live_) 提纯工具
零浏览器依赖 · Next.js Server Action 协议直连 · 自动签署免费路由条款 · 在线验活即用

License Disclaimer Python Powered By RegisterHub Live Demo

简体中文 | English | 🚀 主框架 RegisterHub | 🌐 在线演示


框架母港与生态互链 (Ecosystem Backlink)

项目背景与主框架传送门:
本独立工程由开源万能自动化注册与可视化工作台 RegisterHub 解耦派生。

如果你需要 Web 可视化工作台(零 Node 依赖)、内置 AI 对话自动探测新站写适配器、跨分辨率 6 套视窗标定、IP 纯净度打分 或 一站式账号资产导出,欢迎前往并 Star 我们的开源主框架:


项目简介

针对 TokenHarbor 打造的 100% 纯协议(零浏览器) 注册与 API Key 提纯工具。产出的 thk_live_... Key 为标准 OpenAI 兼容接口(https://tokenharbor.ai/v1),开箱即可调用其 :free 免费模型路由(如 deepseek-v4.1-flash:free、deepseek-v4-flash:free、mimo-v2.6-flash:free、mimo-v2.5:free 等)。

核心技术亮点

  • 100% 纯协议、零浏览器依赖:直接通过 curl_cffi 保持真实 TLS 指纹一致性,直连 Next.js Server Action (useActionState multipart RSC 协议),无需安装 Playwright/Chromium。
  • 动态 Action ID 自愈:当站点前端发版导致 Server Action 哈希变更时,自动从 /_next/static/*.js 中解析最新的 createServerReference ID 并无感重试。
  • 自动解锁 :free 免费模型路由:注册激活后自动拉取 /api/me/free-tier 模型清单并按官方格式提交 /api/me/privacy 同意声明,确保签发的 Key 立即可调用免费路由。
  • 三种开箱即用接码方式:
    • tempmail:内置三通道公共临时邮箱(mail.tm / guerrillamail / tempmail.io 自动故障切换,零配置直接跑);
    • imap:纯标准库单账号 IMAP 无损轮询(BODY.PEEK[],支持 Outlook / Gmail / QQ / 163 / 自有域,适合目标站限制临时邮箱时使用);
    • manual:终端交互模式,手动粘贴激活链接即可。
  • 真凭据在线验活 + 原子落盘:每把签发的 thk_live_... 均实时调用 /api/cli/free-tier 与 /v1/models 核验 models_enabled=true 后,经跨进程文件锁原子落盘至 results/accounts.txt。
  • 合规透明边界:本项目不内置任何自动求解或绕过人机校验模块;若当前出口 IP 触发 needCaptcha=true 或 account_cap,脚本会明确提示并支持通过 --proxy-file 切换至干净住宅/纯净出口 IP。

极速上手

1. 环境准备(仅 2 个依赖)

需要 Python ≥ 3.10:

# 1. 克隆本项目
git clone https://github.com/waw666waw666/tokenharbor-register.git
cd tokenharbor-register

# 2. 安装极简依赖(零浏览器内核依赖)
pip install -r requirements.txt

2. 配置代理与邮箱(可选)

复制 config.example.json 为 config.json 按需填写:

{
  "proxy": {
    "server": "http://127.0.0.1:7897",
    "proxies_file": ""
  },
  "mail": {
    "imap_server": "imap.example.com",
    "imap_port": 993,
    "imap_ssl": true,
    "imap_user": "your-name@example.com",
    "imap_password": "your-app-password",
    "timeout_secs": 75
  },
  "run": {
    "delay_between": 3.0
  },
  "output_dir": "./results"
}

提示:

  • 未配置 mail.imap_* 时,默认 auto 模式会自动使用内置三通道临时邮箱;若目标站限制部分临时邮箱域,推荐填写自己的 Outlook/Gmail/自有域 IMAP 或使用 --mail-mode manual。
  • 建议使用纯净非香港/非数据中心出口 IP(可用 python main.py --check-ip 检测当前出口纯净度)。

3. 一键运行

Windows 可直接双击 run.bat,或通过命令行运行:

# 生成 1 个账号与已验活的 thk_live_ API Key
python main.py -n 1 --proxy http://127.0.0.1:7897

# 使用多代理列表自动轮换(proxies.txt 每行一个代理地址)
python main.py -n 3 --proxy-file proxies.txt

# 使用自有邮箱手动贴激活链接模式
python main.py --mail-mode manual --email you@example.com --proxy http://127.0.0.1:7897

# 对已保存的全部 Key 执行批量在线验活
python main.py --verify --proxy http://127.0.0.1:7897

# 检测当前出口 IP 纯净度打分
python main.py --check-ip --proxy http://127.0.0.1:7897

# 导出账号台账为 CSV / JSON / Bitwarden
python main.py --export csv

产物原子持久化至 results/accounts.txt:

邮箱----密码----thk_live_xxxxxxxx----时间戳

4. 使用生成的 API Key(OpenAI 兼容)

curl https://tokenharbor.ai/v1/chat/completions \
  -H "Authorization: Bearer thk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4.1-flash:free",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

AI 助手协同指南 (Cursor / Claude Code / Windsurf / Gemini)

将本仓库作为工作区根目录打开,仓库自带 AGENTS.md 与 SETUP_FOR_AI.md:

  • 直接向 AI 发送:请参考 AGENTS.md 检查本机环境与出口 IP 纯净度,帮我配置 config.json 并运行 python main.py -n 1 验证输出到 results/accounts.txt。

RegisterHub 开源生态

项目 定位与核心亮点 仓库 / 入口
RegisterHub 万能自动化注册主框架 · 零依赖 Studio Web 工作台 · 内置 AI 直跑 · 6 套视窗标定 GitHub 主仓
RegisterHub Live Demo 纯前端零后端在线交互体验站(完整体验 Studio 工作台与 AI 流式对话) 在线体验
TokenHarbor Register 本仓库 · 100% 纯协议 Next.js Server Action 注册与免费模型路由 thk_live_ 提纯 GitHub

单元测试

pytest tests/ -q

免责声明 (Disclaimer)

本项目仅供软件工程自动化、HTTP 协议分析与合法测试验证交流使用。使用者必须严格遵守目标平台服务条款与所在地法律法规,严禁将本项目用于未经授权的滥用或非法用途。详见 DISCLAIMER.zh.md 与 DISCLAIMER.md。


开发者社区与交流

About

100% Pure-Protocol TokenHarbor Registration & Free-Route OpenAI API Key Tool (Powered by RegisterHub)

Resources

Stars

9 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages