web-reverse-api
Skill0 starsChanged 3 months agoMITView on GitHub
网页端转 OpenAI API:抓取国产大模型网页端 cookie,逆向出 API 端点,统一转为 OpenAI 兼容格式接入智能体。覆盖即梦、豆包、Kimi、DeepSeek、通义千问等。
- Pipes a download into a shell
In this repository219 other files it gives its agents.
- agent-doctrineSkill
- agent-evaluation-frameworkSkill
- agent-visualization-flintSkill
- hermes-agentSkill
- bailian-cliSkill
- edge-browser-automationSkill
- computer-useSkill
- jupyter-live-kernelSkill
- backup-strategiesSkill
- browser-automationSkill
- chinese-ai-free-apiSkill
- cicd-pipeline-templatesSkill
- copybaraSkill
- devops-toolkitSkill
- email-deliverabilitySkill
- monitoring-observabilitySkill
- obsidian-maintenanceSkill
- obsidian-troubleshootingSkill
- openclaw-windowsSkill
- openclaw-workerSkill
- webhook-subscriptionsSkill
- windows-dev-environmentSkill
- windows-masterSkill
- zero-downtime-deploySkill
- codebase-inspectionSkill
- github-workflowSkill
- adaptive-communicationSkill
- agent-cost-dashboardSkill
- agent-evolutionSkill
- agent-governanceSkill
- agent-osSkill
- context-efficient-toolsSkill
- context-loss-awarenessSkill
- creative-synthesisSkill
- hermes-desktop-pluginsSkill
- emotional-intelligenceSkill
- graph-engineering-workflowSkill
- hermes-maintenanceSkill
- hermes-voiceSkill
- hermes-hygieneSkill
- identity-coreSkill
- income-loopSkill
- master-synthesisSkill
- meta-cognitionSkill
- reasoning-engineSkill
- self-preservationSkill
- teaching-abilitySkill
- temporal-awarenessSkill
- hermes-themesSkill
- thinking-visualizationSkill
- user-modelingSkill
- voice-full-restoreSkill
- knowledge-graph-traversalSkill
- mcp-browser-canvasSkill
- free-api-gatewaySkill
- native-mcpSkill
- ai-edaSkill
- huggingface-hubSkill
- industrial-ai-siemens-mcpSkill
- industrial-ai-unifiedSkill
- The first 60 shown.
The file
Files
网页逆向 API — 国产大模型免费用
核心思路
所有国产大模型的网页版背后都有内部 API。登录后拿到 cookie,模拟网页端的请求即可免费调用。统一转为 OpenAI 兼容格式后,任何智能体都能接入。
通用方法
1. 获取 Cookie
- 浏览器登录目标网站
- F12 → 应用程序 (Application) → Cookies → 找到对应域名的 cookie
- 关键: 不要只复制单个 cookie 值,直接打开 Network 标签,随便点一条发往目标域名的请求,看 Request Headers 里的 Cookie 整行,全部复制。很多服务需要多个 cookie 协同(passport、csrf、session、ttwid 等)
2. 抓取 API 端点
- F12 → Network → 清空
- 在网页上执行操作(发消息、生成图片等)
- 找到 POST 类型的 XHR/Fetch 请求
- 右键 → 复制 → 复制为 cURL (bash)
- 从 cURL 中提取: URL、请求体、必需 Headers
3. 写 Python 转发
核心模式:
用户 cookie → Python → 目标网站 API → 解析响应 → OpenAI 格式返回已适配服务
即梦 (Jimeng/Seedance) — 图像/视频 ✅
- 域名: jimeng.jianying.com
- Cookie: sessionid
- 签名: MD5 of
9e2c|{uri[-7:]}|7|5.8.0|{ts}||11ac - Headers 必带: Device-Time, Sign, Sign-Ver, Appid, Appvr, Pf
- 图片端点: POST
/mweb/v1/aigc_draft/generate - 轮询端点: POST
/mweb/v1/get_history_by_ids - 状态码: 20/42/45=处理中, 21/50=完成, 30=失败
- 积分: 每日 66 免费积分
- 请求体核心:
draft_content(JSON 字符串, 含 component_list + abilities),metrics_extra(JSON 字符串) - Abilities 结构:
generate.core_param包含 model, prompt, image_ratio, large_image_info - 脚本:
D:/Hermes/scripts/jimeng_api.py(纯 Python, 完全可用) - 官方 CLI:
curl -s https://jimeng.jianying.com/cli | bash→ 下载 dreamina CLI (需要 VIP 会员) - 注意事项:
- 初次生成需先刷新积分 (
receiveCredit) - 2K 分辨率消耗约 53 积分, 1K 消耗 1 积分
- 积分不足返回错误码 1006
- 初次生成需先刷新积分 (
豆包 (Doubao) — 对话 🔶 阻塞
- 域名: doubao.com
- 端点: POST
/chat/completion(新版,旧版/samantha/chat/completion已废弃) - Cookie: sessionid, sessionid_ss + 完整 cookie 链 (passport_csrf_token, sid_guard, uid_tt, sid_ucp_v1, ttwid 等)
- 额外参数: aid=497858 + 17 个参数 (device_id, web_id, pc_version, pkg_type, samantha_web, tea_uuid 等)
- 额外 Headers: X-Flow-Trace, agw-js-conv
- 反爬: msToken 和 a_bogus — 浏览器 JS 每请求实时生成的 HMAC 签名,无法纯 Python 模拟
- 请求体: 新版使用
client_meta+content_block(block_type=10000) +option复杂结构 - 状态: 格式正确(已返回 rate_limited 而非 auth error),但 msToken/a_bogus 一次一密,需浏览器实时提供
DeepSeek — 对话 ⏳
- 域名: chat.deepseek.com
- Cookie: userToken
- 状态: 待适配
Kimi — 对话 ⏳
- 域名: kimi.moonshot.cn
- Cookie: refreshToken
- 状态: 待适配
通义千问 — 对话 ⏳
- 域名: tongyi.aliyun.com
- Cookie: login_tongyi_ticket
- 状态: 待适配
智谱 — 对话 ⏳
- 域名: chatglm.cn
- Cookie: chatglm_refresh_token
- 状态: 待适配
统一网关
- 脚本:
D:/Hermes/scripts/free_api_router.py - 启动:
python free_api_router.py --port 8800 - 端点:
http://localhost:8800/v1 - 模型列表:
GET /v1/models - 对话:
POST /v1/chat/completions - 绘图:
POST /v1/images/generations - 自动 cookie: 尝试从 Edge/Chrome 浏览器 cookie 数据库读取
注意事项
- 所有逆向 API 仅供个人学习和测试使用
- cookie 有时效性,过期后需重新登录获取
- 官方可能随时修改 API 端点或增加反爬措施
- 不要在短时间内大量请求,避免触发风控
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

