Claude Code model router

Codebuddy2api

Proxy CodeBuddy with OpenAI-compatible and Anthropic-compatible APIs for Codex, Claude Code, and standard SDK clients.

Install

From source
git clone https://github.com/orangeboyChen/codebuddy2api.git

From the README

CodeBuddy2API

Proxy CodeBuddy with OpenAI-compatible and Anthropic-compatible APIs for Codex, Claude Code, and standard SDK clients.

CodeBuddy2API is a self-hosted gateway with a web-based admin console for managing credentials, access keys, usage, account status, debug traces, and runtime settings. The console is a progressive web app, so a browser can install it as a desktop or home-screen app.

This project is a substantial refactor of Sliverkiss/CodeBuddy2api, with a redesigned admin console, multi-protocol API support, and flexible storage backends.

Quick Start

The following command starts a single-instance deployment with SQLite:

Open http://127.0.0.1:8001/dashboard, complete CodeBuddy authentication or add a credential manually, then create an access key for your clients.

Desktop App

Electron builds ship with every release — macOS (Apple silicon and Intel), Windows, and Linux (x86_64 and arm64):

Download the latest release

The app bundles the same gateway: it starts it on 127.0.0.1:8001 and opens the console in a native window. Data stays in Electron's userData directory, so there is nothing to configure. The macOS builds are signed and notarized, so the dmg opens on a double-click; on Windows, dismiss the SmartScreen prompt with Run anyway.

API Compatibility

The gateway exposes these endpoints under /v1:

- POST /v1/chat/completions — OpenAI Chat Completions
- POST /v1/responses — OpenAI Responses
- POST /v1/messages — Anthropic Messages
- GET /v1/models — models available to the requesting access key

Authenticate inference requests with either header:

Example OpenAI-compatible request:

Storage

- file — zero-configuration storage for a single instance
- sqlite — encrypted SQLite storage for a single instance
- pg — PostgreSQL storage for multiple…
Read the full README on GitHub

Details

Language
TypeScript
License
MIT
Last updated
2 November 2026
Topics
anthropic-compatibleclaudeclaude-codecodebuddycodexopenai-compatibleproxy

FAQ

What is Codebuddy2api?

Proxy CodeBuddy with OpenAI-compatible and Anthropic-compatible APIs for Codex, Claude Code, and standard SDK clients. It is a model router for Claude Code, from orangeboyChen/codebuddy2api on GitHub.

How do I install Codebuddy2api?

Clone orangeboyChen/codebuddy2api from GitHub and follow the setup steps in its README.

Is Codebuddy2api popular?

orangeboyChen/codebuddy2api has 33 GitHub stars and 10 forks. It was last updated on 2 November 2026.

More model routers & proxies

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