Claude Code model router

Cnb2api

Turn CNB cloud-workspace in-network AI into production OpenAI & Anthropic (Claude Code) APIs. Zero deps, v5.2 self-healing HA, quota CLI.

Install

From source
git clone https://github.com/dengyie/cnb2api.git

From the README

cnb2api

Turn CNB Cloud Workspace In-Network AI into a Production-Ready API Gateway

Get Up to 200M Free DeepSeek Tokens Monthly · Zero External Dependencies · 7×24h Self-Healing HA

*OpenAI + Anthropic Dual Protocols · Zero-Config Claude Code Direct Connect · v5.2 Architecture · Terminal Quota Dashboard*

-10a37f?style=flat&logo=deepseek)

English · 简体中文
TL;DR: CNB grants verified orgs 500 ~ 1,166 AI Credits and 1,600 compute core-hours monthly for free. Combined with CNB's 30x prompt caching discount, you can enjoy up to ~200 Million DeepSeek Tokens per month for free! However, the AI completion endpoint is strictly locked inside the workspace intranet with ephemeral pipeline tokens, while containers are recycled daily. cnb2api runs inside the workspace, converts it into a standard public API with zero dependencies, and leverages a v5.2 dual-watchdog self-healing architecture to deliver permanent domain access and 7×24 HA.

Why cnb2api?

Key Features

- 💰 Up to 200M Free DeepSeek Tokens Monthly:
  - Fully unleashes the 500~1,166 monthly AI Credits provided for free by CNB.
  - Native 30x Prompt Cache discount on upstream completions. In typical coding assistant, Claude Code, and multi-turn Agent scenarios with high prompt reuse, effective capacity reaches ~200M tokens/month.
- ⚡ Native Dual-Protocol Support:
  - OpenAI Compatible: /v1/chat/completions and /v1/models, supporting SSE streaming and faithful non-streaming aggregation (reconstructing usage, exact credit costs, incremental tool_calls, and finish_reason).
  - Anthropic Compatible: /v1/messages and /v1/messages/count_tokens, enabling Claude Code CLI direct connection with full support for thinking blocks, tool calling, and event streams.
  - 🛡️ Outbound Neutralizer: Transparently rewrites Claude Code…
Read the full README on GitHub

Details

Language
JavaScript
License
MIT
Last updated
4 October 2026
Topics
anthropicapi-gatewayclaude-codeclicnbllmopenaiopenai-compatibleproxyquotaself-healingsse

FAQ

What is Cnb2api?

Turn CNB cloud-workspace in-network AI into production OpenAI & Anthropic (Claude Code) APIs. Zero deps, v5.2 self-healing HA, quota CLI. It is a model router for Claude Code, from dengyie/cnb2api on GitHub.

How do I install Cnb2api?

Clone dengyie/cnb2api from GitHub and follow the setup steps in its README.

Is Cnb2api popular?

dengyie/cnb2api has 92 GitHub stars and 57 forks. It was last updated on 4 October 2026.

More model routers & proxies

Dsh Permission Rules

134

PerryLink/dsh-permission-rules

Claude Code-style declarative permission rules for DeepSeek Harness: ordered allow/deny/ask rules with tool-name, argument (glob/regex), and workspace-path matching on the tools/pre-execute waterfall, session-log audit, and HMR reload.

Model routers & proxies

Claude Code Open

70

Davincible/claude-code-open

Claude Code with any LLM provider (OpenRouter, Gemini, Kimi K2)

Model routers & proxies13

Tokenbank

110

wink-run/tokenbank

Token Bank — the local LLM gateway that sits between your AI agents and every provider. Know where tokens go · Spend less with smart routing to Ollama, Groq, GitHub Models · Earn by sharing idle quota on a community P2P network. One-click onboarding for Cursor, Claude Code, Codex CLI, Gemini CLI — no agent changes. Full trace, seamless model swap

Model routers & proxies18

Litellm Relay

113

LiteLLM-Labs/litellm-relay

Onboard AI tools in one step, and catch the rest. Relay sets up Claude Desktop, Claude Code, and Codex to run through your LiteLLM AI Gateway with zero dev setup and routes shadow AI (Notion AI, Perplexity, …) there too.

Model routers & proxies11

Claude

107

travisjneuman/.claude

The Ultimate Claude Code Toolkit: 180 skills, 10 agents, 29 commands, 7 hooks, and 81 marketplace repos (11,000+ community skills). Drop-in ~/.claude config with a generated index and router that loads the right resources on demand. Zero config required.

Model routers & proxies25

Anthropic Proxy Rs

94

m0n0x41d/anthropic-proxy-rs

A proxy server that intercepts Anthropic API requests and converts them to OpenAI-compatible format, enabling integration with dozens of inference providers such as OpenRouter, Together.ai, Novita AI, and other third-party API services. Primary use cases include Claude Code and other Claude Agent SDK-based tools.

Model routers & proxies36

Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.