justlovemaki/AIClient2API
Self-hosted multi-protocol AI API proxy for Antigravity, Codex, Grok, Kiro, OpenAI, Claude, and custom providers. Supports OpenAI-compatible API, Claude API, Gemini protocol conversion, GPT, Grok Build, Claude Opus, Gemini Pro, Kimi, MiniMax, provider pools, smart routing, and automatic failover.
AIClient2API (A2) – A Unified Proxy for Client‑Only LLM APIs
What it is – A Node.js‑based server that sits between your application and a variety of “client‑only” large‑model services (Google Gemini, Antigravity, Codex, xAI Grok, Kiro, Claude, etc.). It rewrites the proprietary request/response formats of those services into the standard OpenAI REST API, letting any OpenAI‑compatible tool (Cherry‑Studio, NextChat, Cline, etc.) call them as if they were ordinary OpenAI endpoints.
Core ideas
| Feature | Why it matters |
|---|---|
| OpenAI‑compatible interface | No code changes are needed for existing tools; they just point to the proxy URL. |
| Multi‑model support | One configuration gives access to dozens of models (Gemini, Claude, Grok, Codex, Kiro, MiniMax, …). |
| Strategy/Adapter architecture | Each provider has its own adapter that knows how to translate between the provider’s native protocol and the OpenAI schema. |
| Account‑pool & fail‑over | Multiple credentials can be loaded; the proxy rotates them, retries on failure, and degrades gracefully, achieving ~99.9 % uptime. |
| TLS fingerprint spoofing | Built‑in Go uTLS side‑car mimics a real browser, bypassing Cloudflare/403 blocks that would otherwise stop automated calls. |
| Agent‑first design | Provides hooks for AI agents (OpenClaw, Hermes, Claude Code) to discover the service automatically via a “skill” file. |
| Full‑chain logging | Every request and response is recorded, enabling audit, debugging, and private dataset creation. |
How it works (high‑level flow)
- Client request – Your app sends a normal OpenAI‑style HTTP request (e.g.,
POST /v1/chat/completions). - Router – The proxy examines the path and the
modelfield to decide which provider adapter to use. - Adapter – The selected adapter:
- Authenticates (OAuth, cookies, API keys) to the target service.
- Translates the OpenAI JSON payload into the provider’s native format.
- Sends the request (often via a TLS‑spoofed connection).
- Response handling – The provider’s reply is converted back into OpenAI JSON (including streaming
dataevents when supported). - Logging & health checks – All traffic is logged; health‑check endpoints monitor provider availability and rotate accounts if needed.
Getting started
| Step | Command / Action |
|---|---|
| Run with Docker | docker run -d -p 8080:8080 -v /my/configs:/app/configs justlikemaki/aiclient-2-api |
| Configure providers | Edit configs/provider_pools.json (example file provided) to list credentials for each model you want to expose. |
| Point your tool | Set the API base URL to http://localhost:8080/v1 (or your server’s address). |
| Optional UI | A web console (added Nov 2025) lets you view health status, logs, and switch models in real time. |
Notable recent updates (2026)
- Grok Build support – OAuth flow for xAI Grok, including multimodal generation and built‑in tools (web search, code interpreter, file attachments).
- Deep AI integration – Auto‑generated
/api/helpand/api/exampleendpoints so AI agents can discover the full set of 50+ API routes. - Image generation – Full OpenAI
/v1/images/generationsand/v1/images/editsconversion to each provider’s native image APIs. - Provider‑pool manager – Async refresh queues, deduplication, global concurrency limits, and automatic token expiry handling.
Who might use it?
- Developers who have built tools around the OpenAI API but want to tap cheaper or free models that are otherwise locked behind a browser‑only client.
- Teams needing a single endpoint for many LLM vendors (e.g., a SaaS that wants to let customers pick Claude, Gemini, or Grok without rewriting integration code).
- AI agents that can load the provided “skill” file to learn how to call the proxy automatically.
License & community
- GPL‑v3 – source code is open; contributions are welcome.
- Docker Hub – pre‑built images with >100 k pulls.
- Docs – multilingual (EN, ZH, JA) and a full online guide at
https://aiproxy.justlikemaki.vip/en/. - Support – Sponsored by several API‑relay services (PackyCode, RunningHub, AxisNow, etc.) that offer discount codes for users of this proxy.
TL;DR
AIClient2API is a Node.js proxy that turns otherwise “client‑only” LLM services into a standard OpenAI‑compatible API, handling authentication, protocol translation, account pooling, and even TLS fingerprint spoofing. It lets any OpenAI‑aware application use models like Gemini, Claude, Grok, and Codex without code changes, while providing logs, health monitoring, and agent‑friendly skill files.
Related
- Project
- Project
- Project
- Project
- Project