Self-hosted multi-protocol AI API proxy for Antigravity, Codex, Grok, Kiro, OpenAI, Claude, and custom providers. Supports OpenAI-compatible API, Claude API, Ge
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 are listed in chronological order; all are recommended for registration and use.
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-oauthxAI 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/exampleendpoints, 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_PATHparameter inconfigs/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
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.
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 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-apiParameter 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 nameYou can also use Docker Compose for deployment. First, navigate to the docker directory:
cd docker
mkdir -p configs
docker compose up -dTo build from source instead of using the pre-built image, edit docker-compose.yml:
image: justlikemaki/aiclient-2-api:latestbug(codex-oauth): 带图片的长会话 prompt cache 崩到只剩 ~30k token 头部(真实流量 6-9%),而字节级稳定的合成请求可达 99%
400 Bad Request (stream): The 'gpt-5.5' model is not supported when using Codex with a ChatGPT account.
[Bug] /v1/chat/completions 的 reasoning_effort 被静默丢弃;thinking passthrough 的 effort 钳位使 Kiro 通道 xhigh/max 不可达
kiro反代claude用不了好像
GitHub 提问 (Issue) 高质量操作指南