Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

AIClient2API

> 编程语言
Open source

Self-hosted multi-protocol AI API proxy for Antigravity, Codex, Grok, Kiro, OpenAI, Claude, and custom providers. Supports OpenAI-compatible API, Claude API, Ge

8.6K stars0 likes5 views
WebsiteGitHub

About

Self-hosted multi-protocol AI API proxy for Antigravity, Codex, Grok, Kiro, OpenAI, Claude, and custom providers. Supports OpenAI-compatible API, Claude API, Ge


Sponsors

Sponsors are listed in chronological order; all are recommended for registration and use.

  </a>
</td>
<td width="75%" align="left" valign="middle">
  PackyCode is a reliable and efficient API relay service provider, offering relay services for Claude Code, Codex, Gemini, and more. PackyCode provides special discounts for our software users: <a href="https://www.packyapi.com/register?aff=AIClient2API">register using this link</a> and enter the <strong>AIClient2API</strong> promo code during recharge to get <strong>10% off</strong>.
</td>
  </a>
</td>
<td width="75%" align="left" valign="middle">
  <strong>VMCard | Enterprise Payment Cards for AI Businesses</strong> is built for AI account vendors, AI API providers, and teams managing bulk subscriptions. It enables seamless GPT / Claude payments with dedicated U.S. Visa BINs, API-based bulk card issuance, and the lowest settlement exchange rates available—ideal for high-volume, long-term, stable payment needs. <a href="https://vmcardio.com/zh/register?code=OPXPWHXWD5">Register through this link</a>.
</td>
  </a>
</td>
<td width="75%" align="left" valign="middle">
  <a href="https://www.axisnow.io">AxisNow</a> protects and accelerates websites and APIs while delivering an optimized access experience across mainland China and the rest of the world. Through its client SDK, AxisNow extends acceleration and security capabilities to native/mobile apps — <strong>self-hosted private CDN|subscription-based DDoS-protected CDN|independently controlled, flexibly composable CDN networks.</strong>
</td>
</td>
<td width="75%" align="left" valign="middle">
  <strong>Become a Sponsor</strong><br>
  If you would like to sponsor this project, please scan the WeChat QR code on the left (Please state your intent: <strong>Sponsorship</strong>).
</td>

Overview

AIClient2API is an API proxy service that breaks through client limitations, converting free large models originally restricted to client use only (such as Gemini, Antigravity, Codex, Grok, Kiro) into standard OpenAI-compatible interfaces that can be called by any application. Built on Node.js, it supports intelligent conversion between OpenAI, Claude, and Gemini protocols, enabling tools like Cherry-Studio, NextChat, and Cline to freely use advanced models such as Claude Opus and Gemini Pro at scale. The project adopts a modular architecture based on strategy and adapter patterns, with built-in account pool management, intelligent polling, automatic failover, and health check mechanisms, ensuring 99.9% service availability.

[!NOTE] ** Important Milestone**

  • Thanks to Ruan Yifeng for the recommendation in Weekly Issue 359

** Version Update Log**

Click to expand detailed version history
  • 2026.06.03 - Added Grok Build (Grok CLI) support: integrated the grok-cli-oauth xAI OAuth / Responses API flow, covering Grok Build text models, multi-protocol conversion, built-in tools (web search, X search, code interpreter, collections/file attachments), and image/video generation models.
  • 2026.05.04 (v3.0.0) - Milestone Update: Deep AI Integration & Self-Discovery Architecture. Added automated Skill guides and remote /api/help, /api/example endpoints, enabling AI agents to seamlessly understand and operate 50+ full API endpoints; achieved full unification of CLI and REST API output results with enhanced structured JSON support.
  • 2026.04.29 - Comprehensive support for OpenAI standard Image Generation (/v1/images/generations) and Image Editing (/v1/images/edits) interfaces. Supports automatic conversion from OpenAI format to native image generation protocols of various models, fully compatible with provider pool polling and retry mechanisms, significantly improving the stability of multimodal creation.
  • 2026.03.02 - Added Grok protocol support, supporting access to xAI Grok series models (Grok) via Cookie/SSO, supporting multimodal input, image/video generation, automatic token refresh and streaming output
  • 2026.01.26 - Added Codex protocol support: supports OpenAI Codex OAuth authorization access
  • 2026.01.25 - Enhanced AI Monitor plugin: supports monitoring request parameters and responses before and after AI protocol conversion. Optimized log management: unified log format, visual configuration
  • 2026.01.15 - Optimized provider pool manager: added async refresh queue mechanism, buffer queue deduplication, global concurrency control, node warmup and automatic expiry detection
  • 2026.01.03 - Added theme switching functionality and optimized provider pool initialization, removed the fallback strategy of using provider default configuration
  • 2025.12.30 - Added main process management and automatic update functionality
  • 2025.12.25 - Unified configuration management: All configs centralized to configs/ directory. Docker users need to update mount path to -v "local_path:/app/configs"
  • 2025.12.11 - Automatically built Docker images are now available on Docker Hub: justlikemaki/aiclient-2-api
  • 2025.11.30 - Added Antigravity protocol support, enabling access to Gemini Pro, Claude Sonnet, and other models via Google internal interfaces
  • 2025.11.11 - Added Web UI management console, supporting real-time configuration management and health status monitoring
  • 2025.11.06 - Added support for Gemini Preview, enhanced model compatibility and performance optimization
  • 2025.10.18 - Kiro open registration, new accounts get 500 credits, full support for Claude Sonnet
  • 2025.08.29 - Released account pool management feature, supporting multi-account polling, intelligent failover, and automatic degradation strategies
    • Configuration: Add PROVIDER_POOLS_FILE_PATH parameter in configs/config.json
    • Reference configuration: provider_pools.json
  • History Developed
    • Support Gemini , Kiro and other client2API
    • OpenAI, Claude, Gemini three-protocol mutual conversion, automatic intelligent switching

Core Advantages

AI-First, Agent Interaction Support

AI-First Design: This project natively supports efficient interaction with mainstream AI Agents such as OpenClaw, Hermes, and Claude Code.

** Quick Command**: You can tell the AI this sentence directly, and it will automatically master all usage of this project:

  • Remote Deployment:
    Please load and learn the Skill in https://raw.githubusercontent.com/justlovemaki/AIClient2API/main/docs/skills/aiclient-cli-usage.md (Service Address: your actual domain or IP, Login Password: your actual password) to master all usage of AIClient2API.
  • Local Mode: If you are running the AI agent directly in your local environment, just send:
    Please load and learn the Skill in docs/skills/aiclient-cli-usage.md to help me start, configure, and manage the AIClient2API service locally.

Unified Access, One-Stop Management

  • Multi-Model Unified Interface: Through standard OpenAI-compatible protocol, configure once to access mainstream large models including Gemini, Claude, Grok, Codex, Kimi, MiniMax
  • Flexible Switching Mechanism: Path routing, support dynamic model switching via startup parameters or environment variables to meet different scenario requirements
  • Zero-Cost Migration: Fully compatible with OpenAI API specifications, tools like Cherry-Studio, NextChat, Cline can be used without modification
  • Multi-Protocol Intelligent Conversion: Support intelligent conversion between OpenAI, Claude, and Gemini protocols for cross-protocol model invocation

Break Through Limitations, Improve Efficiency

  • Bypass Official Restrictions: Utilize OAuth authorization mechanism to effectively break through rate and quota limits of services like Gemini, Antigravity
  • TLS Fingerprint Bypass: Built-in TLS Sidecar (Go uTLS) to simulate browser features, effectively bypassing Cloudflare 403 blocks for services like Grok
  • Free Advanced Models: Use Claude Opus for free via Kiro API mode, reducing usage costs
  • Intelligent Account Pool Scheduling: Support multi-account polling, automatic failover, and configuration degradation, ensuring 99.9% service availability

️ Secure and Controllable, Data Transparent

  • Full-Chain Log Recording: Capture all request and response data, supporting auditing and debugging
  • Private Dataset Construction: Quickly build proprietary training datasets based on log data
  • System Prompt Management: Support override and append modes, achieving perfect combination of unified base instructions and personalized extensions

Developer-Friendly, Easy to Extend

  • Web UI Management Console: Real-time configuration management, health status monitoring, API testing and log viewing
  • Modular Architecture: Based on strategy and adapter patterns, adding new model providers requires only 3 steps
  • Complete Test Coverage: Integration and unit test coverage 90%+, ensuring code quality
  • Containerized Deployment: Provides Docker support, one-click deployment, cross-platform operation

Quick Navigation

  • Core Advantages
  • Quick Start
    • Docker Deployment
    • Core Features
  • Authorization Configuration Guide
  • Authorization File Storage Paths
  • ⚙️ Advanced Configuration
  • ❓ FAQ
  • Open Source License
  • Acknowledgements
  • ⚠️ Disclaimer

Usage Instructions

Quick Start

The most recommended way to use AIClient2API is to start it through an automated script and configure it visually directly in the Web UI console.

Docker Quick Start (Recommended)

bash
docker run -d -p 3000:3000 -p 8086:8086 -p 1455:1455 -p 56121:56121 -p 19876-19880:19876-19880 --restart=always -v "your_path/configs:/app/configs" -v "your_path/plugins:/app/src/plugins-user" --name aiclient2api justlikemaki/aiclient-2-api

Parameter Description:

  • -d: Run container in background
  • -p 3000:3000 ...: Port mapping. 3000 is for Web UI, others are for OAuth callbacks (Antigravity: 8086, Codex: 1455, Grok CLI: 56121, Kiro: 19876-19880)
  • --restart=always: Container auto-restart policy
  • -v "your_path/configs:/app/configs": Mount configuration directory (replace "your_path" with actual path, e.g., /home/user/aiclient2api)
  • -v "your_path/plugins:/app/src/plugins-user": Mount user plugins directory
  • --name aiclient2api: Container name

Docker Compose Deployment

You can also use Docker Compose for deployment. First, navigate to the docker directory:

bash
cd docker
mkdir -p configs
docker compose up -d

To build from source instead of using the pre-built image, edit docker-compose.yml:

  1. Comment out the image: justlikemaki/aiclient-2-api:latest

Issues· 8 open

View all issuesOpen on GitHub
  • #713

    bug(codex-oauth): 带图片的长会话 prompt cache 崩到只剩 ~30k token 头部(真实流量 6-9%),而字节级稳定的合成请求可达 99%

    Updated Sep 28, 2026
  • #712

    400 Bad Request (stream): The 'gpt-5.5' model is not supported when using Codex with a ChatGPT account.

    Updated Sep 28, 2026
  • #710

    [Bug] /v1/chat/completions 的 reasoning_effort 被静默丢弃;thinking passthrough 的 effort 钳位使 Kiro 通道 xhigh/max 不可达

    Updated Sep 24, 2026
  • #395

    kiro反代claude用不了好像

    Updated Aug 5, 2026
  • #128

    GitHub 提问 (Issue) 高质量操作指南

    good first issueUpdated Jun 29, 2026

> Tags

JavaScriptaicodingfree

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 30, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言