1837620622

Cknb Transfer API — AI skill for Claude Code

AI community

统一 AI API 中转 · Aggregates Claude/GPT/Gemini/DeepSeek V4 via unlimited.surf + BTL free models.

How to install Cknb Transfer API

This entry records only its repository, not the path inside it, so there is no exact command to give. Open 1837620622/cknb-transfer-api and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Cknb Transfer API does

统一 AI API 中转 · Aggregates Claude/GPT/Gemini/DeepSeek V4 via unlimited.surf + BTL free models. Dual protocol (OpenAI + Anthropic), key pool, proxy failover, streaming retry, white-label, model catalog with expiration.

Alternatives in AI

  • Free GPT4 WEB API — Not just GPT4 690 ★
  • Browser Search — A skill for AI agents: search the web with SearXNG, browse with Camofox, bypass protections with CloakBrowser 499 ★
  • Unlimited Claude AI — Claude AI. No backend, no server costs, 100% free 353 ★

README

CKNB Transfer API

统一聚合 Claude、GPT、Gemini、DeepSeek V4 等顶级模型的通用中转服务,同时集成 **[Bad Theory Labs (BTL)](https://btl.uk)** 免费模型。提供 **OpenAI 兼容** 与 **Anthropic / Claude Code 兼容** 双协议接口,BTL 模型支持 Anthropic ↔ OpenAI 自动协议转换。自带 Key 池、代理池故障转移、指数退避重试、身份白标、流式重试,支持 **Node.js 服务器** 部署。默认模型 `gateway-claude-opus-4-8`(Claude Opus 4.8)。

中文 | [English](#english)


目录


功能特性

  • OpenAI 兼容:/v1/chat/completions、/v1/responses、/v1/models、/v1/files。
  • Anthropic 兼容:/v1/messages、/v1/models、/anthropic/v1/messages、/anthropic/v1/models。
  • Claude 模型 /v1/messages 直接透传上游原生接口,完整保留 tools(工具调用)、thinking(思维链)、真实 usage、流式结构。
  • OpenAI /v1/chat/completions 带 tools 时自动转换到 Anthropic 协议,返回标准 tool_calls 和 finish_reason: tool_calls。
  • Key 池:通过伪造 X-Forwarded-For 自动生成多个独立 key 并轮询,规避单 key 限速;key 失效(401/429/502)自动淘汰并立即用伪造 IP 生成新 key 补充,池子持续自更新(仅服务器版)。
  • 代理池故障转移:直连上游失败时,自动通过 proxy.scdn.io 的免费公共代理 IP 重试(仅服务器版)。
  • 流式重试 + 指数退避:首个有效内容前出错自动换 key / 换代理重试,最多 10 次,指数退避间隔(300ms→2s)+ 随机抖动,绕过上游偶发 502 / 429 / closed-without-text / WebSocket error。
  • 身份白标:模型始终自称 cknb-claude,输出层自动过滤 Claude / Anthropic 等上游身份词汇。
  • 原始接口代理:/api/* 直接转发到上游。
  • BTL 免费模型集成:集成 Bad Theory Labs 提供的 DeepSeek V4 Pro/Flash(限时免费至 2026-06-28)及 10 余个免费池模型,用量在模型列表中清晰标注到期时间和供应商标签。
  • Anthropic ↔ OpenAI 协议自动转换:请求 BTL 模型时,Anthropic 协议 /v1/messages 自动转换为 OpenAI 格式 → 调用 BTL → 再将响应还原为 Anthropic 流式格式,客户端无需感知差异。
  • BTL 工具调用保护:BTL 模型不支持 tool_calls,服务端自动剥离 tools 参数并注入回退提示,避免空响应。
  • 双供应商模型目录:前端模型列表为每个模型展示 厂商(Anthropic/OpenAI/DeepSeek/xAI 等)+ 供应商(unlim