The fastest and best local API proxy service! Convert Antigravity's top AI models to OpenAI/Anthropic compatible API
ไธญๆ่ฏดๆ | Features | Quick Start | Architecture
Disclaimer: This project is based on reverse engineering of Antigravity. Future compatibility is not guaranteed. For long-term use, avoid updating Antigravity.
- Grok provider support - Added xAI Grok via the Grok CLI reverse proxy (
cli-chat-proxy.grok.com, OpenAI Responses API), with account import, model routing, and quota-store integration alongside existing providers - Two Grok models exposed - The standard ModelName
grok-build(shown as Xbuild; this maps to the actual Grok 4.3 model, as visible inside the Grok CLI) andgrok-composer-2.5-fast(Composer 2.5 Fast) - Credential reuse - Grok credentials are imported from the local Grok CLI session (
~/.grok/auth.json) and auto-refreshed; chosen to reduce account-ban risk and because community needs are still undefined (no standalone login flow is added)
v3.0.0
- Kiro provider support - Added Kiro account import, quota visibility, model routing, and reverse-proxy support alongside existing providers
- Dashboard i18n - Added global Chinese support, system-language default detection, and a Settings language switch
- Account diagnostics assistant - Added a localhost-only diagnostics panel for checking missing account files, CLI tools, callback ports, and provider setup
- Panel updates - Added a localhost-only update checker and source-install updater, with package-manager safeguards for WinGet and Docker
- Docker support hardened - Updated Docker defaults, OAuth port ranges, health checks, development compose separation, and Docker-specific update guidance
v2.9.0
- Stable Homebrew package - Homebrew now installs a prebuilt macOS Apple Silicon bundle, so
brew install anti-apino longer depends on local Rust, LLVM, or Bun downloads - WinGet distribution pipeline - Added Windows portable packaging, WinGet manifest generation, and release workflow for
winget install anti-api - Unified launcher behavior - Homebrew and WinGet installs now share the same contract:
anti-apistarts the service directly in any terminal - Portable runtime support - Added a Windows portable entrypoint that starts the Rust proxy, serves the bundled dashboard files, and avoids package-manager self-update conflicts
- Package-manager safeguards - Homebrew/WinGet installs now redirect updates to
brew upgrade anti-apiandwinget upgrade anti-apiinstead of self-overwriting
v2.8.0
- Zed hosted-model support - Anti-API can now import the current Zed.app login state and route requests to Zed-hosted models
- Per-account dynamic model fetch - Routing fetches live models from each available Codex and Copilot account, and now includes Zed account-level model sync
- Zed account behavior clarified - Zed accounts can be imported one by one and kept in Anti-API, but they cannot be bulk auto-discovered like Codex/Copilot
- Zed quota widget updated - The Zed card now shows shared all-model support status and billing-period timing instead of misleading remaining-credit percentages
- Zed stability hardening - Added request timeouts and success-state recovery for Zed account fetch, model sync, and completion requests
v2.7.1
- Per-account model fetch (Routing) - Model lists are now fetched from each logged-in Codex/Copilot account instead of relying on static presets
- Antigravity fetch integration (single account) - Routing now attempts live model fetch from the first available Antigravity account and falls back safely when unavailable
- Account-level model map in
/routing/config- AddedaccountModelsso the UI can render account-specific model lists directly - Routing panel model rendering update - Account cards now show models from fetched account-level data first, then fallback models
v2.7.0
- Antigravity proxy notice - Google has officially prohibited reverse-proxy usage of its AI services. The Antigravity reverse proxy still works for now but is no longer recommended
- Codex & Copilot unaffected - Reverse-proxy services for Codex and GitHub Copilot remain fully functional and are not subject to the restriction above
- Log IDE Out - New one-click action to sign out of the Antigravity IDE (closes the IDE, clears auth, ready for a different account)
v2.6.2
- Per-request log context isolation - Error logs no longer mix model/account under concurrency
- Copilot TLS hardening - Default TLS verification restored; optional
ANTI_API_COPILOT_INSECURE_TLS=1for restricted networks - Codex TLS hardening - Default TLS verification restored; optional
ANTI_API_CODEX_INSECURE_TLS=1for restricted networks - Routing config resilience - Soft timeouts and caching for Copilot model sync and quota aggregation
- Dynamic model sync - Routing now syncs Codex/Copilot model lists from authenticated accounts with static fallback
- Test baseline fixes -
bun test ./testavoids legacy folders; updated mocks and default settings
- Flow + Account Routing - Custom flows for non-official models, account chains for official models
- Five Providers - Antigravity, Codex, GitHub Copilot, Zed hosted models, and Kiro
- Remote Access - ngrok/cloudflared/localtunnel with one-click setup
- Full Dashboard - Quota monitoring, routing config, settings panel
- Auto-Rotation - Account switching on 429 errors
- Dual Format - OpenAI and Anthropic API compatible
- Tool Calling - Function calling for Claude Code and CLI tools
- Import model - Anti-API reads the currently signed-in
Zed.appaccount from macOS Keychain when you clickAdd Account -> Zed - Why it differs from Codex/Copilot - Zed does not expose multiple local auth files that can be scanned in bulk; the local desktop state is effectively a single current login
- What multi-account means for Zed here - You can switch accounts inside Zed and import them one at a time into Anti-API; imported Zed accounts remain stored in Anti-API afterwards
- What is not supported - Automatic bulk discovery of many Zed accounts from one machine is not available in the same way as Codex/Copilot
- Quota monitor behavior - Zed hosted models share one monthly spend pool across the account. Anti-API currently shows hosted access status and billing period, not exact remaining dollar credits
- Credit note - Zed plan credit depends on the plan type. For example, Zed Student is documented by Zed as including $10/month in AI token credits, while standard Pro pages may show different included credit values
Two free methods to get one year of Gemini Pro:
Method 1: Telegram Bot (Quick and stable, one-time free) https://t.me/sheeridverifier_bot
Method 2: @pastking's Public Service (Unlimited, requires learning) https://batch.1key.me
# Install dependencies
bun install
# Start server (default port: 8964)
bun run src/main.ts startDouble-click start.bat to launch.
WinGet packaging is prepared in this repository. After the winget-pkgs submission is merged, the install path will be:
winget install anti-api
anti-apiAfter installation, anti-api starts the service directly in any terminal.
Double-click start.command to launch.
Multi-arch images (linux/amd64, linux/arm64) are published to GHCR, so most users never build locally.
docker run -d --name anti-api \
-p 8964:8964 -p 1455-1465:1455-1465 -p 51121-51131:51121-51131 \
-v anti-api-data:/app/data \
ghcr.io/ink1ing/anti-api:latestOr with Compose (pulls the prebuilt image, then runs in the background):
docker compose pull
docker compose up -dOn Windows, run the exact same commands in PowerShell. The named volume anti-api-data is managed by Docker, so there is no $HOME/path setup to get wrong.
The container can't read your local IDE credentials, so sign in via OAuth:
- Open the dashboard: http://localhost:8964/quota
- Click Login for a provider:
- GitHub Copilot โ easiest in Docker: enter the shown device code at https://github.com/login/device.
- Antigravity / Codex โ the panel (and
docker logs anti-api) prints anOpen this URL to login: ...link. Open it in your browser; the callback returns tolocalhostand is captured by the mapped ports.
- When the account appears on the dashboard, point your client at
http://localhost:8964(token can be any value).
You can also log in from a terminal:
docker compose exec anti-api bun run src/main.ts add-account.
| Port range | Purpose |
|---|---|
8964 |
Main API + dashboard |
51121-51131 |
Antigravity OAuth callback |
1455-1465 |
Codex OAuth callback |
Copilot uses a device-code flow and needs no callback port.
OAuth callbacks redirect to localhost, which won't reach a remote box from your laptop's browser. Either:
- set
ANTI_API_OAUTH_REDIRECT_URL=http://YOUR_HOST:51121/oauth-callbackand open the printed URL, or - use Copilot (device flow, no callback), or
- SSH-forward the ports:
ssh -L 8964:localhost:8964 -L 51121:localhost:51121 user@host.
The server has no authentication โ do not expose these ports to the public internet. Keep them on a private network or behind your own auth/tunnel.
Accounts and routing config live in the anti-api-data named volume. To reuse data from a native install, mount your host folder instead of the named volume in docker-compose.yml:
volumes:
- ${HOME}/.anti-api:/app/data # macOS / Linux
# - ${USERPROFILE}/.anti-api:/app/data # WindowsTo import host provider credentials (Codex/AWS/Kiro/etc.) read-only, uncomment the example mounts in docker-compose.yml.
docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build- Build locally instead of pulling:
docker compose up -d --build(the image already ships the toolchain for the nativebetter-sqlite3module). - In-panel self-update is disabled in Docker; upgrade with
docker compose pull && docker compose up -d. - Restricted networks:
ANTI_API_COPILOT_INSECURE_TLS=1/ANTI_API_CODEX_INSECURE_TLS=1bypass TLS verification (not recommended generally). ANTI_API_CODEX_REASONING_EFFORT=low|medium|highsets Codex default effort (defaultmedium).- Override the base image if a registry is slow:
BUN_IMAGE=oven/bun:1.3.5 docker compose build. - ngrok is bundled for Linux amd64/arm64.
- Formatting: follow
.editorconfig(4-space indent, LF). - Tests:
bun test - Contributing: see
docs/CONTRIBUTING.md
Add to ~/.claude/settings.json:
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:8964",
"ANTHROPIC_AUTH_TOKEN": "any-value"
}
}Access the tunnel control panel at http://localhost:8964/remote-panel
Supported tunnels:
- ngrok - Requires authtoken from ngrok.com
- cloudflared - Cloudflare Tunnel, no account required, high network requirements
- localtunnel - Open source, no account required, less stable
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Anti-API (Port 8964) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ Dashboard โ โ Routing โ โ Settings โ โ
โ โ /quota โ โ /routing โ โ /settings โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Smart Routing System โ โ
โ โ โข Flow Routing (custom model IDs) โ โ
โ โ โข Account Routing (official model IDs) โ โ
โ โ โข Auto-rotation on 429 errors โ โ
โ โ โข Multi-provider support โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ Antigravity โ โ Codex โ โ Copilot โ โ
โ โ Provider โ โ Provider โ โ Provider โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโ โ
โ โ Zed โ โ
โ โ Provider โ โ
โ โโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Upstream Cloud APIs โ
โ (Google, OpenAI, GitHub, Zed) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Beta Feature: Routing is experimental. Configuration may change in future versions.
The routing system is split into two modes:
- Flow Routing: Custom model IDs (e.g.
route:fast) use your flow entries. - Account Routing: Official model IDs (e.g.
claude-sonnet-4-5) use per-model account chains.
This enables fine-grained control over model-to-account mapping, allowing you to:
- Load Balance: Distribute requests across multiple accounts
- Model Specialization: Route specific models to dedicated accounts
- Provider Mixing: Combine Antigravity, Codex, GitHub Copilot, and Zed in custom flows
- Fallback Chains: Automatic failover when primary accounts hit rate limits
Request
โโ Official model โ Account Routing โ Account chain โ Provider โ Upstream API
โโ Custom model/route:flow โ Flow Routing โ Flow entries โ Provider โ Upstream API
No match โ 400 error
- Access Panel:
http://localhost:8964/routing - Flow Routing: Create a flow (e.g., "fast", "opus"), add Provider โ Account โ Model entries
- Account Routing: Choose an official model, set account order, optionally enable Smart Switch
- Use Flow: Set
modeltoroute:<flow-name>or the flow name directly - Use Official Model: Request the official model ID directly (e.g.,
claude-sonnet-4-5)
Example Request:
{
"model": "route:fast",
"messages": [{"role": "user", "content": "Hello"}]
}Flow Priority: Entries are tried in order. If an account hits 429, the next entry is used. Account Routing: If Smart Switch is on and no explicit entries exist, it expands to all supporting accounts in creation order.
Expose your local Anti-API to the internet for cross-device access. Useful for:
- Mobile Development: Test AI integrations on iOS/Android
- Team Sharing: Share your quota with teammates
- External Tools: Connect AI tools that require public URLs
| Tunnel | Account Required | Stability | Speed |
|---|---|---|---|
| ngrok | Yes (free tier) | Best | Fast |
| cloudflared | No | Good | Medium |
| localtunnel | No | Fair | Slow |
- Access Panel:
http://localhost:8964/remote-panel - Configure (ngrok only): Enter your authtoken from ngrok.com
- Start Tunnel: Click Start, wait for public URL
- Use Remote URL: Replace
localhost:8964with the tunnel URL
Security Note: Anyone with your tunnel URL can access your API. Keep it private.
Configure application behavior at http://localhost:8964/settings:
- Auto-open Dashboard: Open quota panel on startup
- Auto-start ngrok: Start tunnel automatically
- Model Preferences: Set default models for background tasks
| Model ID | Description |
|---|---|
claude-sonnet-4-5 |
Fast, balanced |
claude-sonnet-4-5-thinking |
Extended reasoning |
claude-opus-4-5-thinking |
Most capable |
claude-opus-4-6-thinking |
Most capable (new generation) |
gemini-3-flash |
Fastest responses |
gemini-3-pro-high |
High quality |
gemini-3-pro-low |
Cost-effective |
gpt-oss-120b |
Open source |
| Model ID | Description |
|---|---|
claude-opus-4-5-thinking |
Opus via Copilot |
claude-sonnet-4-5 |
Sonnet via Copilot |
gpt-4o |
GPT-4o |
gpt-4o-mini |
GPT-4o Mini |
gpt-4.1 |
GPT-4.1 |
gpt-4.1-mini |
GPT-4.1 Mini |
| Model ID | Description |
|---|---|
gpt-5.3-max-high |
5.3 Max (High) |
gpt-5.3-max |
5.3 Max |
gpt-5.3 |
5.3 |
gpt-5.3-codex |
5.3 Codex |
gpt-5.2-max-high |
5.2 Max (High) |
gpt-5.2-max |
5.2 Max |
gpt-5.2 |
5.2 |
gpt-5.2-codex |
5.2 Codex |
gpt-5.1 |
5.1 |
gpt-5.1-codex |
5.1 Codex |
gpt-5 |
5 |
Codex reasoning effort support:
- Global default:
ANTI_API_CODEX_REASONING_EFFORT=low|medium|high(default:medium) - Per request (
/v1/chat/completions):reasoning_effortorreasoning.effort
| Endpoint | Description |
|---|---|
POST /v1/chat/completions |
OpenAI Chat API |
POST /v1/messages |
Anthropic Messages API |
GET /v1/models |
List models |
GET /quota |
Quota dashboard |
GET /routing |
Routing config |
GET /settings |
Settings panel |
GET /remote-panel |
Tunnel control |
GET /health |
Health check |
- Unit Tests - Core logic covered with automated tests
- Formatting Rules -
.editorconfigkeeps diffs consistent - Input Validation - Request validation for security
- Response Time Logging - Performance monitoring
- Centralized Constants - No magic numbers
- Comprehensive Docs - API reference, architecture, troubleshooting
See docs/ folder for detailed documentation.
MIT
่ดๅไบๆไธบๆๅฟซๆๅฅฝ็จ็APIๆฌๅฐไปฃ็ๆๅก๏ผๅฐ Antigravity ๅ ๆจกๅ้ ้ข่ฝฌๆขไธบ OpenAI/Anthropic ๅ ผๅฎน็ API
ๅ ่ดฃๅฃฐๆ๏ผๆฌ้กน็ฎๅบไบ Antigravity ้ๅๅผๅ๏ผๆชๆฅ็ๆฌๅ ผๅฎนๆงๆช็ฅ๏ผ้ฟไน ไฝฟ็จ่ฏทๅฐฝๅฏ่ฝ้ฟๅ ๆดๆฐAntigravityใ
- ๆฐๅข Grok Provider ๆฏๆ - ้่ฟ Grok CLI ็ๅๅไปฃ็๏ผ
cli-chat-proxy.grok.com๏ผOpenAI Responses API๏ผๆฅๅ ฅ xAI Grok๏ผๅ ๅซ่ดฆๅทๅฏผๅ ฅใๆจกๅ่ทฏ็ฑไธ้ ้ขไฝ็ณป้ๆ - ๆด้ฒไธคไธช Grok ๆจกๅ - ๆไพ็ๆ ๅ ModelName ๆฏ
grok-build๏ผ้ขๆฟๆพ็คบไธบ Xbuild๏ผ๏ผไฝๅ ถๅฏนๅบ็ๅฎ้ ๆจกๅๆฏ Grok 4.3๏ผๅฏๅจ Grok CLI ๅ ็ๅฐ๏ผ๏ผไปฅๅgrok-composer-2.5-fast๏ผComposer 2.5 Fast๏ผ - ๅค็จๆฌๅฐๅญ่ฏ - Grok ๅญ่ฏไปๆฌๅฐ Grok CLI ไผ่ฏ๏ผ
~/.grok/auth.json๏ผๅฏผๅ ฅๅนถ่ชๅจ็ปญๆ๏ผ้ๆฉ่ฏฅๆนๅผๆฏไธบไบ้ไฝ่ดฆๅท่ขซๅฐ็ฆ็ๅฏ่ฝๆง๏ผไธ็คพๅบ็ๅ ทไฝ้ๆฑๅฐไธ็กฎๅฎ๏ผไธๆฐๅข็ฌ็ซ็ปๅฝๆต็จ๏ผ
v3.0.0
- ๆฐๅข Kiro Provider ๆฏๆ - ๅ ๅ ฅ Kiro ่ดฆๅทๅฏผๅ ฅใ้ ้ขๅฑ็คบใๆจกๅ่ทฏ็ฑๅๅๅไปฃ็่ฝๅ
- ๆงๅถ้ขๆฟๅฝ้ ๅ - ๅขๅ ๅ จๅฑไธญๆๆฏๆใ้ป่ฎค่ท้็ณป็ป่ฏญ่จ๏ผๅนถๅจ่ฎพ็ฝฎ้กตๆไพ่ฏญ่จๅๆข
- ่ดฆๅท่ฏๆญๅฉๆ - ๆฐๅขไป ้ๆฌๆบ่ฎฟ้ฎ็่ฏๆญ้ขๆฟ๏ผ็จไบๆฃๆฅ่ดฆๅทๆไปถใCLI ๅทฅๅ ทใๅ่ฐ็ซฏๅฃๅ provider ้ ็ฝฎ
- ้ขๆฟๆดๆฐ่ฝๅ - ๆฐๅขไป ้ๆฌๆบ่ฎฟ้ฎ็ๆฃๆฅๆดๆฐๅๆบ็ ๅฎ่ฃ ไธ้ฎๆดๆฐ๏ผๅนถๅฏน WinGetใDocker ๅไฟๆคๆ็คบ
- ๅฎๅ Docker ๆฏๆ - ๆดๆฐ Docker ้ป่ฎค้ ็ฝฎใOAuth ็ซฏๅฃ่ๅดใๅฅๅบทๆฃๆฅใๅผๅ compose ๅ็ฆปๅ Docker ๆดๆฐ่ฏดๆ
v2.9.0
- ็จณๅฎ็ Homebrew ๅฎ่ฃ
ๅ
- Homebrew ็ฐๅจ็ดๆฅๅฎ่ฃ
้ข็ผ่ฏ็ macOS Apple Silicon ๅ
๏ผ
brew install anti-apiไธๅไพ่ตๆฌๅฐไธ่ฝฝ RustใLLVM ๆ Bun - ๆฐๅข WinGet ๅๅธ้พ่ทฏ - ่กฅ้ฝไบ Windows portable ๆๅ
ใWinGet manifest ็ๆๅ release workflow๏ผไธบ
winget install anti-apiๅๅๅค - ็ปไธๅฎ่ฃ
ๅๅฏๅจ่กไธบ - Homebrew ๅ WinGet ๅฎ่ฃ
ๅ็่กไธบ็ปไธไธบ๏ผๅจไปปๆ็ป็ซฏ่พๅ
ฅ
anti-api็ดๆฅๅฏๅจๆๅก - ๆฐๅขไพฟๆบ่ฟ่กๆถๆฏๆ - Windows portable ๅ ฅๅฃไผ่ชๅจๆ่ตท Rust proxy๏ผๅ ่ฝฝๆๅ ๅ็ dashboard ้ๆๆไปถ๏ผๅนถ่ง้ฟๅ ็ฎก็ๅจๅฎ่ฃ ไธ็่ชๆดๆฐๅฒ็ช
- ๅขๅผบๅ
็ฎก็ๅจไฟๆค - Homebrew / WinGet ๅฎ่ฃ
ไธๅ่ช่ฆ็ๆดๆฐ๏ผ่ๆฏๅๅซๆ็คบไฝฟ็จ
brew upgrade anti-apiๅwinget upgrade anti-api
v2.8.0
- ๆฐๅข Zed ๆ็ฎกๆจกๅๆฏๆ - Anti-API ็ฐๅจๅฏไปฅๅฏผๅ ฅๅฝๅ Zed.app ็็ปๅฝๆ๏ผๅนถๅฐ่ฏทๆฑ่ทฏ็ฑๅฐ Zed ๆไพ็ๆจกๅ
- ๆ่ดฆๅทๅจๆๆๅๆจกๅ - Routing ไผไปๆฏไธชๅฏ็จ็ Codex ๅ Copilot ่ดฆๅทๅฎๆถๆๅๆจกๅ๏ผๅนถๅ ๅ ฅ Zed ็่ดฆๅท็บงๆจกๅๅๆญฅ
- ๆ็กฎ Zed ่ดฆๅท่พน็ - Zed ่ดฆๅทๅฏไปฅ้ไธชๅฏผๅ ฅๅนถไฟๅญๅจ Anti-API ไธญ๏ผไฝไธ่ฝๅ Codex/Copilot ไธๆ ท่ชๅจๆน้ๅ็ฐ
- ๆดๆฐ Zed ้ ้ขๅก็ - Zed ๅก็ๆนไธบๅฑ็คบๅ ฑไบซ็ all models ๆฏๆ็ถๆๅ่ฎข้ ๅจๆๆถ้ด๏ผไธๅ็จ่ฏฏๅฏผๆง็ๅฉไฝ้ขๅบฆ็พๅๆฏ
- ๅขๅผบ Zed ็จณๅฎๆง - ไธบ Zed ็่ดฆๅท่ฏปๅใๆจกๅๅๆญฅๅ completion ่ฏทๆฑๅขๅ ไบ่ถ ๆถๆงๅถไธๆๅๅ็ถๆๆขๅค
- Flow + Account ่ทฏ็ฑ - ่ชๅฎไนๆตๆงๅถ้ๅฎๆนๆจกๅ๏ผๅฎๆนๆจกๅไฝฟ็จ่ดฆๅท้พ
- ไบๅฎถ Provider - AntigravityใCodexใGitHub CopilotใZed ๆ็ฎกๆจกๅใKiro
- ่ฟ็จ่ฎฟ้ฎ - ngrok/cloudflared/localtunnel ไธ้ฎ่ฎพ็ฝฎ
- ๅฎๆด้ขๆฟ - ้ ้ข็ๆงใ่ทฏ็ฑ้ ็ฝฎใ่ฎพ็ฝฎ้ขๆฟ
- ่ชๅจ่ฝฎๆข - 429 ้่ฏฏๆถๅๆข่ดฆๅท
- ๅๆ ผๅผๆฏๆ - OpenAI ๅ Anthropic API ๅ ผๅฎน
- ๅทฅๅ ท่ฐ็จ - ๆฏๆ function calling๏ผๅ ผๅฎน Claude Code
- ๅฏผๅ
ฅๆนๅผ - ็นๅป
Add Account -> Zedๆถ๏ผAnti-API ไผ่ฏปๅๅฝๅZed.appๅจ macOS Keychain ไธญ็็ปๅฝๆ - ไธบไปไนๅ Codex/Copilot ไธๅ - Zed ๆฌๅฐๆฒกๆๅ Codex/Copilot ้ฃๆ ทๅฏๆน้ๆซๆ็ๅค่ดฆๅท่ฎค่ฏๆไปถ๏ผๆก้ข็ซฏๆฌ่ดจไธๆดๆฅ่ฟโๅฝๅๅ็ปๅฝๆโ
- ่ฟ้็ๅค่ดฆๅทๅซไน - ไฝ ๅฏไปฅๅ ๅจ Zed ๅ ๅๆข่ดฆๅท๏ผๅ้ไธชๅฏผๅ ฅๅฐ Anti-API๏ผๅฏผๅ ฅๅ็ Zed ่ดฆๅทไผ็ปง็ปญไฟๅญๅจ Anti-API ๅ
- ๅฝๅไธๆฏๆ็่ฝๅ - ไธ่ฝๅ Codex/Copilot ไธๆ ท๏ผ็ดๆฅไปไธๅฐๆบๅจไธ่ชๅจๆน้ๅ็ฐๅคไธช Zed ๆฌๅฐ่ดฆๅท
- ้ขๅบฆ็ๆง่ฏดๆ - Zed ็ hosted models ๅ ฑ็จๅไธไธชๆๅบฆๆถ่ๆฑ ใAnti-API ๅฝๅๅฑ็คบ็ๆฏ hosted access ็ถๆๅ่ฎข้ ๅจๆ๏ผไธๆฏ็ฒพ็กฎ็ๅฉไฝ็พๅ ้ขๅบฆ
- Credit ่ฏดๆ - Zed ็ๆๅบฆ credit ๅๅณไบๅ ทไฝ่ฎกๅ็ฑปๅใไพๅฆ Zed Student ๅฎๆน่ฏดๆไธบๆฏๆ $10 AI token credits๏ผ่ๆฎ้ Pro ้กต้ขๅฏ่ฝๆพ็คบไธๅ้ขๅบฆ
ๅๅป start.bat ๅฏๅจใ
ไปๅบๅ
ๅทฒ็ป่กฅ้ฝ WinGet ๆๅ
ไธ manifest ็ๆ้พ่ทฏใๅพ
winget-pkgs ๅๅนถๅ๏ผๅฏ็ดๆฅไฝฟ็จ๏ผ
winget install anti-api
anti-apiๅฎ่ฃ
ๅฎๆๅ๏ผๅจไปปๆ็ป็ซฏ่พๅ
ฅ anti-api ไผ็ดๆฅๅฏๅจๆๅกใ
# ๅฎ่ฃ
ไพ่ต
bun install
# ๅฏๅจๆๅก๏ผ้ป่ฎค็ซฏๅฃ๏ผ8964๏ผ
bun run src/main.ts startๅๅป start.command ๅฏๅจใ
ๆๅปบ๏ผ
docker build -t anti-api .่ฟ่ก๏ผ
docker run --rm -it \\
-p 8964:8964 \\
-p 1455-1465:1455-1465 \\
-p 51121-51131:51121-51131 \\
-e ANTI_API_DATA_DIR=/app/data \\
-e ANTI_API_NO_OPEN=1 \\
-e ANTI_API_OAUTH_NO_OPEN=1 \\
-e ANTI_API_PACKAGE_MANAGER=docker \\
-e ANTI_API_NO_SELF_UPDATE=1 \\
-v $HOME/.anti-api:/app/data \\
anti-apiCompose๏ผ
docker compose up --buildๅผๅ่ฆ็ๆจกๅผ๏ผไธ้ๅปบ๏ผ็ดๆฅไฝฟ็จๆฌๅฐ src/ ไธ public/๏ผ๏ผ
docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d --no-build่ฏดๆ๏ผ
- OAuth ๅ่ฐไฝฟ็จ
51121-51131๏ผAntigravity๏ผๅ1455-1465๏ผCodex ๆต่งๅจ OAuth๏ผ๏ผ่ฏท็กฎไฟๅทฒๆ ๅฐ่ฟไบ็ซฏๅฃใ - ๅฆๆ่ฟ่กๅจ่ฟ็จไธปๆบ๏ผ่ฏทๅฐ
ANTI_API_OAUTH_REDIRECT_URL่ฎพ็ฝฎไธบๅ ฌ็ฝๅฐๅ๏ผไพๅฆhttp://YOUR_HOST:51121/oauth-callbackใ - ๆ่ฝฝ
~/.anti-apiๅ๏ผDocker ไผๅค็จๆฌๅฐ่ดฆๅทๅ่ทฏ็ฑ้ ็ฝฎใ - ๆฌๅฐๅฏผๅ
ฅ็ฑป provider ้ป่ฎค็ไธๅฐๅฎฟไธปๆบๅญๆฎ๏ผๅฆ้ๅฏผๅ
ฅ๏ผ่ฏทๆ
docker-compose.yml้็ๆณจ้็คบไพๆ่ฝฝ.codexใ.cli-proxy-apiใ.awsใKiro CLI ๆ Amazon Q ็ฎๅฝใ - ่ฎพ็ฝฎ
ANTI_API_NO_OPEN=1ๅฏ้ฟๅ ๅฎนๅจๅ ๅฐ่ฏ่ชๅจๆๅผๆต่งๅจใ - Docker ๅ
็ฆ็จ้ขๆฟ่ชๆดๆฐ๏ผ่ฏทไฝฟ็จ
docker compose up -d --build้ๅปบๆๆๅ้ๅๆดๆฐใ - ๅฆๆๅ้็ฝ็ปไธ Copilot TLS ๅคฑ่ดฅ๏ผๅฏ่ฎพ็ฝฎ
ANTI_API_COPILOT_INSECURE_TLS=1๏ผไธๅปบ่ฎฎๅธธ่งไฝฟ็จ๏ผใ - ๅฆๆๅ้็ฝ็ปไธ Codex TLS ๅคฑ่ดฅ๏ผๅฏ่ฎพ็ฝฎ
ANTI_API_CODEX_INSECURE_TLS=1๏ผไธๅปบ่ฎฎๅธธ่งไฝฟ็จ๏ผใ - ๅฏ้่ฟ
ANTI_API_CODEX_REASONING_EFFORT=low|medium|high่ฎพ็ฝฎ Codex ้ป่ฎคๆจ็ๅผบๅบฆ๏ผ้ป่ฎคmedium๏ผใ - ๅฆๆ Docker Hub ไธ็จณๅฎ๏ผ้ป่ฎคๅบ็ก้ๅๅทฒไฝฟ็จ GHCR๏ผๅฏ็จ
BUN_IMAGE=oven/bun:1.3.5่ฆ็ใ - ้ๅๅ ๅทฒไธบ Linux amd64/arm64 ๅฎ่ฃ ngrokใ
- ๆ ผๅผ่ง่๏ผ้ตๅพช
.editorconfig๏ผ4 ็ฉบๆ ผ็ผฉ่ฟใLF ่กๅฐพ๏ผ - ๆต่ฏ๏ผ่ฟ่ก
bun test - ่ดก็ฎๆๅ๏ผๅ่
docs/CONTRIBUTING.md
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Anti-API (็ซฏๅฃ 8964) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ ้
้ข้ขๆฟ โ โ ่ทฏ็ฑ้
็ฝฎ โ โ ่ฎพ็ฝฎ้ขๆฟ โ โ
โ โ /quota โ โ /routing โ โ /settings โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ ๆบ่ฝ่ทฏ็ฑ็ณป็ป โ โ
โ โ โข Flow ่ทฏ็ฑ๏ผ่ชๅฎไนๆจกๅ ID๏ผ โ โ
โ โ โข Account ่ทฏ็ฑ๏ผๅฎๆนๆจกๅ ID๏ผ โ โ
โ โ โข 429 ้่ฏฏ่ชๅจ่ฝฎๆข โ โ
โ โ โข ๅคๆไพๅๆฏๆ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ Antigravity โ โ Codex โ โ Copilot โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโ โ
โ โ Zed โ โ
โ โโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
ๆต่ฏๅ่ฝ๏ผ่ทฏ็ฑ็ณป็ปไธบๅฎ้ชๆงๅ่ฝ๏ผ้ ็ฝฎๆ ผๅผๅฏ่ฝๅจๆชๆฅ็ๆฌไธญๅๆดใ
่ทฏ็ฑ็ณป็ปๆๅไธบไธค็งๆจกๅผ๏ผ
- Flow ่ทฏ็ฑ๏ผ่ชๅฎไนๆจกๅ ID๏ผๅฆ
route:fast๏ผไฝฟ็จๆต้ ็ฝฎ - Account ่ทฏ็ฑ๏ผๅฎๆนๆจกๅ ID๏ผๅฆ
claude-sonnet-4-5๏ผไฝฟ็จ่ดฆๅท้พ
็ฑๆญคๅฎ็ฐๆจกๅๅฐ่ดฆๅท็็ฒพ็ปๆงๅถ๏ผ
- ่ด่ฝฝๅ่กก - ๅฐ่ฏทๆฑๅๅๅฐๅคไธช่ดฆๅท
- ๆจกๅไธ็จ - ๆๅฎๆจกๅไฝฟ็จไธ็จ่ดฆๅท
- ๆททๅๆไพๅ - ็ปๅ AntigravityใCodexใCopilotใZed
- ่ชๅจ้็บง - ่ดฆๅท่งฆๅ 429 ๆถ่ชๅจๅๆขไธไธไธช
่ฏทๆฑ
โโ ๅฎๆนๆจกๅ โ Account ่ทฏ็ฑ โ ่ดฆๅท้พ โ ๆไพๅ โ ไธๆธธ API
โโ ่ชๅฎไนๆจกๅ/route:flow โ Flow ่ทฏ็ฑ โ ๆตๆก็ฎ โ ๆไพๅ โ ไธๆธธ API
ๆ ๅน้
โ 400 ้่ฏฏ
- ่ฎฟ้ฎ้ขๆฟ:
http://localhost:8964/routing - Flow ่ทฏ็ฑ: ๅๅปบๆต๏ผๅฆ "fast", "opus"๏ผ๏ผๆทปๅ ๆไพๅ โ ่ดฆๅท โ ๆจกๅ ๆก็ฎ
- Account ่ทฏ็ฑ: ้ๆฉๅฎๆนๆจกๅ๏ผ้ ็ฝฎ่ดฆๅท้กบๅบ๏ผๆ้ๅผๅฏ Smart Switch
- ไฝฟ็จๆต: ่ฎพ็ฝฎ
"model": "route:<ๆตๅ็งฐ>"ๆ็ดๆฅไฝฟ็จๆตๅ - ไฝฟ็จๅฎๆนๆจกๅ: ็ดๆฅ่ฏทๆฑๅฎๆนๆจกๅ ID๏ผๅฆ
claude-sonnet-4-5๏ผ
Flow ้กบๅบ๏ผๆ้ ็ฝฎ้กบๅบๅฐ่ฏ๏ผ429 ๆถๅๆขไธไธไธชใ Account ่ทฏ็ฑ๏ผSmart Switch ๅผๅฏไธๆช้ ็ฝฎๆก็ฎๆถ๏ผๆ่ดฆๅทๅๅปบ้กบๅบ่ชๅจๅฑๅผใ
ๅฐๆฌๅฐ Anti-API ๆด้ฒๅฐๅ ฌ็ฝ๏ผๆฏๆ่ทจ่ฎพๅค่ฎฟ้ฎ๏ผ
- ็งปๅจๅผๅ - iOS/Android ๆต่ฏ AI ้ๆ
- ๅข้ๅ ฑไบซ - ไธ้ๅๅ ฑไบซ้ ้ข
- ๅค้จๅทฅๅ ท - ่ฟๆฅ้่ฆๅ ฌ็ฝ URL ็ AI ๅทฅๅ ท
| ้ง้ | ้่ฆ่ดฆๅท | ็จณๅฎๆง | ้ๅบฆ |
|---|---|---|---|
| ngrok | ๆฏ๏ผๅ ่ดนๅฑ๏ผ | ๆไฝณ | ๅฟซ |
| cloudflared | ๅฆ | ่ฏๅฅฝ | ไธญ |
| localtunnel | ๅฆ | ไธ่ฌ | ๆ ข |
- ่ฎฟ้ฎ้ขๆฟ:
http://localhost:8964/remote-panel - ้ ็ฝฎ (ngrok): ่พๅ ฅ ngrok.com ็ authtoken
- ๅฏๅจ้ง้: ็นๅปๅฏๅจ๏ผ็ญๅพ ๅ ฌ็ฝ URL
- ไฝฟ็จ่ฟ็จ URL: ็จ้ง้ URL ๆฟๆข
localhost:8964
ๅฎๅ จๆ็คบ: ไปปไฝไบบๆฅๆ้ง้ URL ๅณๅฏ่ฎฟ้ฎๆจ็ API๏ผ่ฏทๅฆฅๅไฟ็ฎกใ
่ฎฟ้ฎ http://localhost:8964/settings ้
็ฝฎ๏ผ
- ่ชๅจๆๅผ้ขๆฟ: ๅฏๅจๆถๆๅผ้ ้ข้ขๆฟ
- ่ชๅจๅฏๅจ ngrok: ่ชๅจๅฏๅจ้ง้
- ๆจกๅๅๅฅฝ: ่ฎพ็ฝฎๅๅฐไปปๅก้ป่ฎคๆจกๅ
| ๆจกๅ ID | ่ฏดๆ |
|---|---|
claude-sonnet-4-5 |
ๅฟซ้ๅ่กก |
claude-sonnet-4-5-thinking |
ๆฉๅฑๆจ็ |
claude-opus-4-5-thinking |
ๆๅผบ่ฝๅ |
claude-opus-4-6-thinking |
ๆๅผบ่ฝๅ๏ผๆฐไธไปฃ๏ผ |
gemini-3-flash |
ๆๅฟซๅๅบ |
gemini-3-pro-high |
้ซ่ดจ้ |
| ๆจกๅ ID | ่ฏดๆ |
|---|---|
claude-opus-4-5-thinking |
Opus |
claude-sonnet-4-5 |
Sonnet |
gpt-4o |
GPT-4o |
gpt-4o-mini |
GPT-4o Mini |
gpt-4.1 |
GPT-4.1 |
| ๆจกๅ ID | ่ฏดๆ |
|---|---|
gpt-5.3-max-high |
5.3 Max (High) |
gpt-5.3-max |
5.3 Max |
gpt-5.3 |
5.3 |
gpt-5.3-codex |
5.3 Codex |
gpt-5.2-max-high |
5.2 Max (High) |
gpt-5.2-max |
5.2 Max |
gpt-5.2 |
5.2 |
gpt-5.1 |
5.1 |
gpt-5 |
5 |
Codex ๆจ็ๅผบๅบฆๆฏๆ๏ผ
- ๅ
จๅฑ้ป่ฎค๏ผ
ANTI_API_CODEX_REASONING_EFFORT=low|medium|high๏ผ้ป่ฎคmedium๏ผ - ๅๆฌก่ฏทๆฑ๏ผOpenAI
/v1/chat/completions๏ผ๏ผreasoning_effortๆreasoning.effort
| ๆจกๅ ID | ่ฏดๆ |
|---|---|
| ๅจๆๆๅ | ๆ่ดฆๅทไป Zed ๅฎๆถๅๆญฅๆจกๅๅ่กจ |
| ๅ ฑไบซ hosted access | ๆๆๆ็ฎกๆจกๅๅ ฑ็จๅไธ hosted ็ถๆ/ๅจๆ |
| ็ซฏ็น | ่ฏดๆ |
|---|---|
POST /v1/chat/completions |
OpenAI Chat API |
POST /v1/messages |
Anthropic Messages API |
GET /quota |
้ ้ข้ขๆฟ |
GET /routing |
่ทฏ็ฑ้ ็ฝฎ |
GET /settings |
่ฎพ็ฝฎ้ขๆฟ |
GET /remote-panel |
้ง้ๆงๅถ |
- ๅๅ ๆต่ฏ - ๆ ธๅฟ้ป่พๅฎๆดๆต่ฏ
- ่พๅ ฅ้ช่ฏ - ่ฏทๆฑ้ช่ฏไฟ้ๅฎๅ จ
- ๅๅบๆถ้ดๆฅๅฟ - ๆง่ฝ็ๆง
- ๅธธ้้ไธญ็ฎก็ - ๆ ้ญๆณๆฐๅญ
่ฏฆ็ปๆๆกฃ่ง docs/ ๆไปถๅคนใ
MIT