Neo 在 Claude Code cch 到底有啥用 中发帖
从【代码】逆向拿到 Claude Code cch 生成算法继续讨论:
有佬友说可以放到自己喜欢的 code 客户端使用。但其实我在逆向的时候,所需求的是把我手上的 Claude Max 20x 安全地转成 API,这样用途会更加广泛。
有佬友应该注意到了,请求的地址是 https://api.anthropic.com/v1/messages 这是什么?这是官方 Claude API使用的地址。请求和返回格式都是原生的 Claude API,不是什么 chat2api。
当我们拿到 oauth sk 和 account uid,补齐一些 headers 和这个 cch 直接发包,它就是个标准的 Claude API。你只需要在转发程序补齐两个 system prompts:
[{
"type": "text",
"text": "x-anthropic-billing-he...