claudeers.

🔓 unclaimed — this page was auto-generated from GitHub. Are you the creator?

Claim this page →
// Other

claude-code-api

claude-code-api — a Claude ecosystem project on GitHub.

// Other[ cli ][ api ][ claude ]#claude#ai#ai-assistant#anthropic#anthropic-claude#claude-ai#claude-api#claude-code#otherGPL-3.0$open-sourceupdated 15 days ago
Actively maintained
97/100
last commit 4 months ago
last release none
releases 0
open issues 0
// install
git clone https://github.com/codingworkflow/claude-code-api

Claude Code API Gateway

OpenAI-compatible API gateway for Claude Code CLI.

What You Get

  • OpenAI-style endpoints (/v1/chat/completions, /v1/models, sessions/projects APIs)
  • Streaming and non-streaming chat completions
  • Claude model aliases and fallback behavior
  • Optional model field: if omitted, CLI default model is used

Quick Start (Linux/macOS)

git clone https://github.com/codingworkflow/claude-code-api
cd claude-code-api
make install
make start

Server URLs:

  • API: http://localhost:8000
  • OpenAPI docs: http://localhost:8000/docs
  • Health: http://localhost:8000/health

Quick Start (Windows)

Use the provided wrappers:

make.bat install
start.bat

Notes:

  • start.bat starts the API in dev mode.
  • make.bat provides common project commands.
  • Claude Code CLI support on Windows may require WSL depending on your local setup.

Supported Models

Model config is in claude_code_api/config/models.json. Override with CLAUDE_CODE_API_MODELS_PATH.

  • claude-opus-4-6-20260205
  • claude-opus-4-5-20251101
  • claude-sonnet-4-5-20250929
  • claude-haiku-4-5-20251001

Alias/fallback behavior:

  • model is optional in /v1/chat/completions.
  • opus, claude-opus-latest, claude-opus-4-6 resolve to Opus 4.6.
  • If Opus 4.6 is rejected at runtime, gateway retries once with latest configured Opus 4.5.
  • If all attempted models are rejected, API returns 400 with error.code = model_not_supported.

API Usage

Chat completion:

curl -X POST http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {"role": "user", "content": "Hello"}
    ]
  }'

List models:

curl http://localhost:8000/v1/models

Streaming:

curl -X POST http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-5-20250929",
    "messages": [{"role": "user", "content": "Tell me a joke"}],
    "stream": true
  }'

Configuration

Common settings are in claude_code_api/core/config.py:

  • claude_binary_path
  • project_root
  • database_url
  • require_auth

Bug Reports & Support

For claude-code-api and ai-code-fusion, use this discussion thread for bug reports and troubleshooting:

Developer Docs

For engineering workflows and internal commands:

  • docs/dev.md

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

// compatibility

Platformscli, api
Operating systems
AI compatibilityclaude
LicenseGPL-3.0
Pricingopen-source
LanguagePython

// faq

What is claude-code-api?

claude-code-api is a Claude ecosystem project. It is open-source on GitHub.

Is claude-code-api free to use?

claude-code-api is open-source under the GPL-3.0 license, so it is free to use.

What category does claude-code-api belong to?

claude-code-api is listed under data in the Claudeers registry of Claude-compatible tools.

0 views
316 stars
unclaimed
updated 15 days ago

// embed badge

claude-code-api on Claudeers
[![Claudeers](https://claudeers.com/api/badge/claude-code-api.svg)](https://claudeers.com/claude-code-api)

// retro hit counter

claude-code-api hit counter
[![Hits](https://claudeers.com/api/counter/claude-code-api.svg)](https://claudeers.com/claude-code-api)

// reviews

// guestbook

0/500

// related in Other

🔓

Open source Ghostty-based macOS terminal with vertical tabs and notifications for AI coding agents. Built for multitasking, organization, and programmability.

// othermanaflow-ai/Swift23,559NOASSERTION[ claude ]
🔓

Huashu Design · HTML-native design skill for Claude Code · Claude Code 里 HTML 原生的设计 skill · 高保真原型 / 幻灯片 / 动画 + 20 设计哲学 + 5 维评审 + MP4 导出 · Agent-agnostic

// otheralchaincyf/HTML20,855MIT[ claude ]
🔓

一份通俗易懂、风趣幽默的Java学习指南,内容涵盖Java基础、Java并发编程、Java虚拟机、Java企业级开发、Java面试等核心知识点。学Java,就认准二哥的Java进阶之路😄

// otheritwanger/Java17,140[ claude ]
🔓

🎬 卡卡字幕助手 | VideoCaptioner - 基于 LLM 的智能字幕助手 - 视频字幕生成、断句、校正、字幕翻译全流程处理!- A powered tool for easy and efficient video subtitling.

// otherWEIFENG2333/Python15,241GPL-3.0[ claude ]
Connectorlinks several projects together across the ecosystem · 11 connections
→ see how claude-code-api connects across the ecosystem