Free · open source · local-first

A transparent bridge from code agents to GitHub Copilot API.

ghc-api is a lightweight compatibility proxy for Claude Code, Codex, pi, OpenClaw, Chatbox clients, and the GitHub Copilot API. It passes through whenever possible and translates only where necessary.

pip install -U ghc-api

Free proxy does not mean free models. ghc-api provides no LLM, inference service, model access, or quota. Bring your own GitHub account with eligible GitHub Copilot access.

ghc-api · localhost:8313● live
CLAUDE CODECODEXPI
OpenAI / Anthropic
g→aghc-apiFREE PROXY
compatibilitystreamingobservability
POST/v1/messages200
SSEcontent_block_delta
TOKin 8,241 · out 1,106
YOUR GITHUB ACCOUNTGitHub Copilot API
Claude CodeCodexpiOpenClawChatboxOpenAI SDKAnthropic SDK
WHY GHC-API

Bridge the right gaps.
Keep everything else simple.

Not another heavyweight gateway—just a focused, inspectable, and efficient compatibility layer.

01

Lightweight by design

Run it as one Python process. No external database service or complicated infrastructure is required to get started.

02

Inspectable, not opaque

See original requests, forwarded payloads, headers, responses, and raw SSE streams. Debug with evidence, not guesses.

03

Just enough compatibility

Pass through when possible. Translate only where real protocol gaps exist, while retaining evidence for inspection.

THE COMPATIBILITY LAYER

One local endpoint for the tools you actually use.

Connect code agents, automation, and chat UIs to the GitHub Copilot API through OpenAI- and Anthropic-compatible interfaces.

CLIENTS
CCClaude CodeAnthropic Messages
CodexOpenAI Responses
πpiCustom provider
+OpenClaw / ChatboxCompatible base URL
JSON + SSE
LOCAL PROXY
  • model & endpoint mapping
  • protocol translation
  • stream reliability
  • request observability
minimum transform
UPSTREAM
GHYour GitHub accountGitHub Copilot API
OBSERVABILITY

See every layer.
Stop guessing.

Recent requests stay in process memory for fast inspection of what entered the proxy, what changed, and what came back. Powerful debugging without a heavyweight observability stack.

  • Original and translated request bodies
  • Headers, responses, and status codes
  • Raw SSE events and stream details
  • Input, output, cache creation, and cache read tokens
  • Statistics by model, endpoint, user, and machine
Explore debugging features
g→a Inspector
Overview
Headers
Request
Response
Raw SSE
POST/v1/messages
200 OK
MODELclaude-sonnet-4
DURATION4.91s
TOKENS9,347
Raw SSEResponse
event: message_start
data: {"type": "message_start"}

event: content_block_delta
data: {"delta": {"text": "..."}}

event: message_delta
data: {"usage": {"output_tokens": 1106}}
MORE THAN A PROXY

From compatibility layer to lightweight agent workspace.

Useful tools live together in one local web UI. Quiet when you do not need them, ready when you do.

WEB UI

Chat and ACP agent console

Chat in the browser or control Claude Code, Codex, and Copilot CLI through ACP. Inspect text, thinking, tool calls, stdout/stderr, and token usage.

U

Trace the streaming path in this project

A

Inspecting SSE handlers...

SESSIONS

Session management

Create, resume, and browse agent sessions while keeping work directories and message history.

claude-code activecodex 12mcopilot-cli 1h
OPTIONAL SYNC

Cross-device sync

Optionally sync sessions, token usage, and Claude Code, Codex, and ghc-api configuration through OneDrive.

OneDrive accessOFF BY DEFAULT
SAFE CONFIG

Config management

Compare local and shared configuration, with timestamped backups before overwriting.

REQUEST FILES

Historical statistics

Optional JSON Lines persistence, reusable indexes, distributions, and exact request drill-down.

LOCAL-FIRST

Local by default. Permissions stay explicit.

Recent API requests remain in process memory by default. File logging is opt-in and OneDrive access starts disabled. ghc-api never sends local proxy requests or sessions to this project website.

Memory recent requestsOpt-in file loggingDisabled OneDrive by default
BUILDING IN PUBLIC

Closing more gaps between agents and backends.

View full roadmap
In development
/messages → /responses

Better Claude Code compatibility

Adapt Anthropic Messages to Responses-only backends with stronger tool use, thinking, SSE, and context continuity.

View development branch ↗
In development
session observability

Session statistics and Gantt timeline

Correlate requests, tokens, retries, and timing while separating observed, inferred, and unknown intervals.

View development branch ↗
PYPI

Downloads last month

Loading public statistics...

START LOCAL

Free to install.
Bring your GitHub account.

Start a local compatibility endpoint in minutes. ghc-api provides proxy software—not LLM access or quota.