集成 · Claude Code
Claude Code 随处可用,Anthropic 协议全保留。
Routify 提供原生 Anthropic Messages 端点。cache_control、anthropic-version、anthropic-beta — 所有 header 原样转发。需要时可在底层切到 DeepSeek / Kimi / GLM,5-10 倍降本,CLAUDE.md 一行不动。
30 秒接入
Claude Code uses an OpenAI-compatible base URL. Override ANTHROPIC_BASE_URL and you’re done — no plugin, no extension, no proxy.
💡 日常补全场景设 ANTHROPIC_MODEL_OVERRIDE=deepseek-chat,长任务再 unset 切回 Claude。一周下来通常省 80% 而不动一行代码。
# Anthropic-protocol passthrough (recommended)
export ANTHROPIC_BASE_URL=https://routify.bytedance.city/v1/anthropic
export ANTHROPIC_API_KEY=rtf_xxx_your_routify_key
claude
# Optional: route Claude Code under-the-hood to DeepSeek
export ANTHROPIC_MODEL_OVERRIDE=deepseek-chat
claude
# Or use the OpenAI-compatible endpoint with the routify-anthropic shim:
export OPENAI_BASE_URL=https://routify.bytedance.city/v1
export OPENAI_API_KEY=rtf_xxx_your_routify_keyANTHROPIC_MODEL_OVERRIDE 是 Routify 扩展,Anthropic 自身不识别。设置它即告知 Routify 将 Messages 请求翻译为目标上游模型,再翻译回来。
推荐配置
为 Claude Code 优选。
三套实战验证过的模型组合。按你的优先级选一套,直接复制 model id 接入。
省钱档
设 ANTHROPIC_MODEL_OVERRIDE=deepseek-chat 把底层模型替换为 DeepSeek V3.2。Claude Code 仍走 Anthropic 协议,但每个请求落到 DeepSeek。tool 调用、JSON 模式、流式响应均自动转换。适合模板化代码占比高的项目。
成本说明
相比 Opus 降本约 95%。复杂重构会有质量下降——那些场景留给 Frontier 档。
主模型
备用模型链
主模型超预算或宕机时,智能路由自动切到链上下一个。
常见问题
prompt 缓存还能用吗?
能。cache_control header 原样转发,缓存命中率与 Anthropic 直连一致。(替换模式下缓存失效,因为上游不是 Anthropic。)
Claude Code 的工具调用能用吗?
Pure / Cost Hybrid 模式下原生支持。Aggressive Substitute 模式下我们把 Anthropic tool_use blocks ↔ OpenAI tool_calls 双向翻译,工具定义不用改。
anthropic-beta header 还能透传吗?
Pass-through 模式下每个 Anthropic header 都透传。替换模式会剥离 Anthropic 专属 header,因为上游不识别。
Computer Use / Bash 工具呢?
Computer Use 是 Anthropic 独有 — Pure 模式透传,Substitute 模式禁用。Bash 工具两种模式都能用。
Mac / Linux / Windows 都支持吗?
都支持。Claude Code CLI 直接读 ANTHROPIC_BASE_URL。
能用自己的 Anthropic key 走 Pure 档吗?
可以——2026 Q3 上线 BYOK。届时纯 pass-through,Routify 不加价,仅收 0-5% 路由费。