{"id":43090147,"url":"https://github.com/benedictking/ccx","last_synced_at":"2026-05-27T14:04:37.247Z","repository":{"id":335667868,"uuid":"1146425139","full_name":"BenedictKing/ccx","owner":"BenedictKing","description":"Claude / Codex / Gemini API Proxy - CCX","archived":false,"fork":false,"pushed_at":"2026-05-23T07:12:50.000Z","size":7722,"stargazers_count":1477,"open_issues_count":14,"forks_count":123,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-05-23T07:33:37.777Z","etag":null,"topics":["claude","codex","gemini"],"latest_commit_sha":null,"homepage":"https://benedictking.github.io/ccx/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BenedictKing.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-01-31T04:27:57.000Z","updated_at":"2026-05-23T07:31:27.000Z","dependencies_parsed_at":"2026-02-28T16:05:25.668Z","dependency_job_id":"512d02b0-2b42-4692-8bd9-c66310071a05","html_url":"https://github.com/BenedictKing/ccx","commit_stats":null,"previous_names":["benedictking/ccx"],"tags_count":226,"template":false,"template_full_name":null,"purl":"pkg:github/BenedictKing/ccx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenedictKing%2Fccx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenedictKing%2Fccx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenedictKing%2Fccx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenedictKing%2Fccx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BenedictKing","download_url":"https://codeload.github.com/BenedictKing/ccx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenedictKing%2Fccx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33465640,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-25T06:32:55.349Z","status":"ssl_error","status_checked_at":"2026-05-25T06:32:35.322Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude","codex","gemini"],"created_at":"2026-01-31T16:09:44.739Z","updated_at":"2026-05-27T14:04:37.229Z","avatar_url":"https://github.com/BenedictKing.png","language":"Go","funding_links":[],"categories":["Others"],"sub_categories":["Usage"],"readme":"# Claude / OpenAI Chat / OpenAI Images / Codex Responses / Gemini API Proxy - CCX\n\nEnglish | [简体中文](README.zh-CN.md)\n\n[![GitHub release](https://img.shields.io/github/v/release/BenedictKing/ccx)](https://github.com/BenedictKing/ccx/releases/latest)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nCCX is a high-performance AI API proxy and protocol translation gateway for Claude, OpenAI Chat, OpenAI Images, Codex Responses, and Gemini. It provides a unified entrypoint, built-in web administration, channel orchestration, failover, multi-key management, and model routing.\n\n## Features\n\n- Integrated backend + frontend architecture with single-port deployment\n- Dual-key authentication with `PROXY_ACCESS_KEY` and optional `ADMIN_ACCESS_KEY`\n- Web admin console for channel management, testing, logs, and monitoring\n- Support for Claude Messages, OpenAI Chat Completions, OpenAI Images, Codex Responses, and Gemini APIs\n- Smart scheduling with priorities, promotion windows, health checks, failover, and circuit recovery\n- Per-channel API key rotation, proxy support, custom headers, model allowlists, and route prefixes\n- Responses session tracking for multi-turn workflows\n- Embedded frontend assets for simple binary deployment\n\n## Screenshots\n\n### Channel Orchestration\n\nVisual channel management with drag-and-drop priority adjustment and real-time health monitoring.\n\n![Channel Orchestration](docs/screenshots/channel-orchestration.png)\n\n### Add Channel\n\nSupports multiple upstream service types and flexible API key, model mapping, and request parameter configuration.\n\n\u003cimg src=\"docs/screenshots/add-channel-modal.png\" width=\"500\" alt=\"Add Channel\"\u003e\n\n### Traffic Stats\n\nReal-time monitoring of per-channel request traffic, success rate, and latency.\n\n![Traffic Stats](docs/screenshots/traffic-stats.png)\n\n## Architecture\n\nCCX exposes one backend entrypoint:\n\n```text\nClient -\u003e backend :3000 -\u003e\n  |- /                            -\u003e Web UI\n  |- /api/*                       -\u003e Admin API\n  |- /v1/messages                 -\u003e Claude Messages proxy\n  |- /v1/chat/completions         -\u003e OpenAI Chat proxy\n  |- /v1/responses                -\u003e Codex Responses proxy\n  |- /v1/images/{...}             -\u003e OpenAI Images proxy\n  |- /v1/models                   -\u003e Models API\n  `- /v1beta/models/*             -\u003e Gemini proxy\n```\n\nImages endpoints currently include:\n- `POST /v1/images/generations`\n- `POST /v1/images/edits`\n- `POST /v1/images/variations`\n\nSee [ARCHITECTURE.md](ARCHITECTURE.md) for the detailed design.\n\n## Quick Start\n\n### Option 1: Binary\n\n1. Download the latest binary from [Releases](https://github.com/BenedictKing/ccx/releases/latest)\n2. Create a `.env` file next to the binary:\n\n```bash\nPROXY_ACCESS_KEY=your-proxy-access-key\nPORT=3000\nENABLE_WEB_UI=true\nAPP_UI_LANGUAGE=en\n```\n\n3. Run the binary and open `http://localhost:3000`\n\nOn Windows, if the client runs from cmd, PowerShell, WSL, or Docker and `localhost` does not reach CCX, use the Windows host IPv4 address instead, for example `http://192.168.1.23:3000`. CCX listens on all interfaces by default through `:PORT`.\n\nFor background startup without Docker, see [Service Startup](docs/service/README.md).\n\n### Option 2: Docker\n\n```bash\ndocker run -d \\\n  --name ccx \\\n  -p 3000:3000 \\\n  -e PROXY_ACCESS_KEY=your-proxy-access-key \\\n  -e APP_UI_LANGUAGE=en \\\n  -v $(pwd)/.config:/app/.config \\\n  crpi-i19l8zl0ugidq97v.cn-hangzhou.personal.cr.aliyuncs.com/bene/ccx:latest\n```\n\nRun in the background with Docker Compose:\n\n```bash\ndocker compose up -d\n```\n\nEnable Watchtower auto-update:\n\n```bash\ndocker compose -f docker-compose.yml -f docker-compose.watchtower.yml up -d\n```\n\nPull the latest image immediately after setup if needed:\n\n```bash\ndocker compose pull ccx\ndocker compose up -d ccx\n```\n\n### Option 3: Build From Source\n\n```bash\ngit clone https://github.com/BenedictKing/ccx\ncd ccx\ncp backend-go/.env.example backend-go/.env\nmake run\n```\n\nUseful commands:\n\n```bash\nmake dev\nmake run\nmake build\nmake frontend-dev\n```\n\n## Core Environment Variables\n\n```bash\nPORT=3000\nENV=production\nENABLE_WEB_UI=true\nPROXY_ACCESS_KEY=your-proxy-access-key\nADMIN_ACCESS_KEY=your-admin-secret-key\nAPP_UI_LANGUAGE=en\nLOG_LEVEL=info\nREQUEST_TIMEOUT=300000\n```\n\n## Main Endpoints\n\n- Web UI: `GET /`\n- Health: `GET /health`\n- Admin API: `/api/*`\n- Claude Messages: `POST /v1/messages`\n- OpenAI Chat: `POST /v1/chat/completions`\n- Codex Responses: `POST /v1/responses`\n- OpenAI Images: `POST /v1/images/generations`, `POST /v1/images/edits`, `POST /v1/images/variations`\n- Gemini: `POST /v1beta/models/{model}:generateContent`\n- Models API: `GET /v1/models`\n\n## Development\n\nRecommended local workflow:\n\n```bash\nmake dev\n```\n\nFrontend only:\n\n```bash\ncd \"frontend\"\nbun install\nbun run dev\n```\n\nBackend only:\n\n```bash\ncd \"backend-go\"\nmake dev\n```\n\n## Additional Docs\n\n- [README.zh-CN.md](README.zh-CN.md)\n- [backend-go/README.md](backend-go/README.md)\n- [ARCHITECTURE.md](ARCHITECTURE.md)\n- [DEVELOPMENT.md](DEVELOPMENT.md)\n- [ENVIRONMENT.md](ENVIRONMENT.md)\n- [docs/service/README.md](docs/service/README.md) - non-Docker service startup\n- [RELEASE.md](RELEASE.md)\n\n## Community\n\nJoin the QQ group for discussion: **642217364**\n\n\u003cimg src=\"docs/qrcode_1769645166806.png\" width=\"300\" alt=\"QQ Group QR Code\"\u003e\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=BenedictKing/ccx\u0026type=Date)](https://www.star-history.com/#BenedictKing/ccx\u0026Date)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenedictking%2Fccx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenedictking%2Fccx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenedictking%2Fccx/lists"}