Skip to content

ink1ing/anti-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

37 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Anti-API

The fastest and best local API proxy service! Convert Antigravity's top AI models to OpenAI/Anthropic compatible API

ไธญๆ–‡่ฏดๆ˜Ž | Features | Quick Start | Architecture

Anti-API Demo


Disclaimer: This project is based on reverse engineering of Antigravity. Future compatibility is not guaranteed. For long-term use, avoid updating Antigravity.

What's New (v3.1.0)

  • 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) and grok-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-api no 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-api starts 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-api and winget upgrade anti-api instead 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 - Added accountModels so 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=1 for restricted networks
  • Codex TLS hardening - Default TLS verification restored; optional ANTI_API_CODEX_INSECURE_TLS=1 for 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 ./test avoids legacy folders; updated mocks and default settings

Features

  • 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

Zed Account Notes

  • Import model - Anti-API reads the currently signed-in Zed.app account from macOS Keychain when you click Add 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

Free Gemini Pro Access

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

Quick Start

Linux

# Install dependencies
bun install

# Start server (default port: 8964)
bun run src/main.ts start

Windows

Double-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-api

After installation, anti-api starts the service directly in any terminal.

macOS

Double-click start.command to launch.

Docker

Multi-arch images (linux/amd64, linux/arm64) are published to GHCR, so most users never build locally.

Quick start (recommended)

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:latest

Or with Compose (pulls the prebuilt image, then runs in the background):

docker compose pull
docker compose up -d

On 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.

First login (once)

The container can't read your local IDE credentials, so sign in via OAuth:

  1. Open the dashboard: http://localhost:8964/quota
  2. 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 an Open this URL to login: ... link. Open it in your browser; the callback returns to localhost and is captured by the mapped ports.
  3. 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.

Ports

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.

Running on a remote host (NAS / VPS)

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-callback and 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.

Data & migration

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  # Windows

To import host provider credentials (Codex/AWS/Kiro/etc.) read-only, uncomment the example mounts in docker-compose.yml.

Development (hot reload)

docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build

Notes

  • Build locally instead of pulling: docker compose up -d --build (the image already ships the toolchain for the native better-sqlite3 module).
  • 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=1 bypass TLS verification (not recommended generally).
  • ANTI_API_CODEX_REASONING_EFFORT=low|medium|high sets Codex default effort (default medium).
  • 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.

Development

  • Formatting: follow .editorconfig (4-space indent, LF).
  • Tests: bun test
  • Contributing: see docs/CONTRIBUTING.md

Claude Code Configuration

Add to ~/.claude/settings.json:

{
  "env": {
    "ANTHROPIC_BASE_URL": "http://localhost:8964",
    "ANTHROPIC_AUTH_TOKEN": "any-value"
  }
}

Remote Access

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

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                      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) โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Smart Routing System (Beta)

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

How It Works

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

Configuration

  1. Access Panel: http://localhost:8964/routing
  2. Flow Routing: Create a flow (e.g., "fast", "opus"), add Provider โ†’ Account โ†’ Model entries
  3. Account Routing: Choose an official model, set account order, optionally enable Smart Switch
  4. Use Flow: Set model to route:<flow-name> or the flow name directly
  5. 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.


Remote Access

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

Supported Tunnels

Tunnel Account Required Stability Speed
ngrok Yes (free tier) Best Fast
cloudflared No Good Medium
localtunnel No Fair Slow

Setup

  1. Access Panel: http://localhost:8964/remote-panel
  2. Configure (ngrok only): Enter your authtoken from ngrok.com
  3. Start Tunnel: Click Start, wait for public URL
  4. Use Remote URL: Replace localhost:8964 with the tunnel URL

Security Note: Anyone with your tunnel URL can access your API. Keep it private.

Settings Panel

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

Supported Models

Antigravity

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

GitHub Copilot

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

ChatGPT Codex

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_effort or reasoning.effort

API Endpoints

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

Code Quality & Testing

  • Unit Tests - Core logic covered with automated tests
  • Formatting Rules - .editorconfig keeps 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.

License

MIT


ไธญๆ–‡่ฏดๆ˜Ž

่‡ดๅŠ›ไบŽๆˆไธบๆœ€ๅฟซๆœ€ๅฅฝ็”จ็š„APIๆœฌๅœฐไปฃ็†ๆœๅŠก๏ผๅฐ† Antigravity ๅ†…ๆจกๅž‹้…้ข่ฝฌๆขไธบ OpenAI/Anthropic ๅ…ผๅฎน็š„ API

ๅ…่ดฃๅฃฐๆ˜Ž๏ผšๆœฌ้กน็›ฎๅŸบไบŽ Antigravity ้€†ๅ‘ๅผ€ๅ‘๏ผŒๆœชๆฅ็‰ˆๆœฌๅ…ผๅฎนๆ€งๆœช็Ÿฅ๏ผŒ้•ฟไน…ไฝฟ็”จ่ฏทๅฐฝๅฏ่ƒฝ้ฟๅ…ๆ›ดๆ–ฐAntigravityใ€‚

ๆ›ดๆ–ฐๅ†…ๅฎน (v3.1.0)

  • ๆ–ฐๅขž 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

Zed ่ดฆๅท่ฏดๆ˜Ž

  • ๅฏผๅ…ฅๆ–นๅผ - ็‚นๅ‡ป 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 ้กต้ขๅฏ่ƒฝๆ˜พ็คบไธๅŒ้ขๅบฆ

ๅฟซ้€Ÿๅผ€ๅง‹

Windows

ๅŒๅ‡ป start.bat ๅฏๅŠจใ€‚

ไป“ๅบ“ๅ†…ๅทฒ็ป่กฅ้ฝ WinGet ๆ‰“ๅŒ…ไธŽ manifest ็”Ÿๆˆ้“พ่ทฏใ€‚ๅพ… winget-pkgs ๅˆๅนถๅŽ๏ผŒๅฏ็›ดๆŽฅไฝฟ็”จ๏ผš

winget install anti-api
anti-api

ๅฎ‰่ฃ…ๅฎŒๆˆๅŽ๏ผŒๅœจไปปๆ„็ปˆ็ซฏ่พ“ๅ…ฅ anti-api ไผš็›ดๆŽฅๅฏๅŠจๆœๅŠกใ€‚

Linux

# ๅฎ‰่ฃ…ไพ่ต–
bun install

# ๅฏๅŠจๆœๅŠก๏ผˆ้ป˜่ฎค็ซฏๅฃ๏ผš8964๏ผ‰
bun run src/main.ts start

macOS

ๅŒๅ‡ป start.command ๅฏๅŠจใ€‚

Docker

ๆž„ๅปบ๏ผš

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-api

Compose๏ผš

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      โ”‚                                        โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                                        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

ๆ™บ่ƒฝ่ทฏ็”ฑ็ณป็ปŸ (Beta)

ๆต‹่ฏ•ๅŠŸ่ƒฝ๏ผš่ทฏ็”ฑ็ณป็ปŸไธบๅฎž้ชŒๆ€งๅŠŸ่ƒฝ๏ผŒ้…็ฝฎๆ ผๅผๅฏ่ƒฝๅœจๆœชๆฅ็‰ˆๆœฌไธญๅ˜ๆ›ดใ€‚

่ทฏ็”ฑ็ณป็ปŸๆ‹†ๅˆ†ไธบไธค็งๆจกๅผ๏ผš

  • Flow ่ทฏ็”ฑ๏ผš่‡ชๅฎšไน‰ๆจกๅž‹ ID๏ผˆๅฆ‚ route:fast๏ผ‰ไฝฟ็”จๆต้…็ฝฎ
  • Account ่ทฏ็”ฑ๏ผšๅฎ˜ๆ–นๆจกๅž‹ ID๏ผˆๅฆ‚ claude-sonnet-4-5๏ผ‰ไฝฟ็”จ่ดฆๅท้“พ

็”ฑๆญคๅฎž็Žฐๆจกๅž‹ๅˆฐ่ดฆๅท็š„็ฒพ็ป†ๆŽงๅˆถ๏ผš

  • ่ดŸ่ฝฝๅ‡่กก - ๅฐ†่ฏทๆฑ‚ๅˆ†ๅ‘ๅˆฐๅคšไธช่ดฆๅท
  • ๆจกๅž‹ไธ“็”จ - ๆŒ‡ๅฎšๆจกๅž‹ไฝฟ็”จไธ“็”จ่ดฆๅท
  • ๆททๅˆๆไพ›ๅ•† - ็ป„ๅˆ Antigravityใ€Codexใ€Copilotใ€Zed
  • ่‡ชๅŠจ้™็บง - ่ดฆๅท่งฆๅ‘ 429 ๆ—ถ่‡ชๅŠจๅˆ‡ๆขไธ‹ไธ€ไธช

ๅทฅไฝœๆต็จ‹

่ฏทๆฑ‚
  โ”œโ”€ ๅฎ˜ๆ–นๆจกๅž‹ โ†’ Account ่ทฏ็”ฑ โ†’ ่ดฆๅท้“พ โ†’ ๆไพ›ๅ•† โ†’ ไธŠๆธธ API
  โ””โ”€ ่‡ชๅฎšไน‰ๆจกๅž‹/route:flow โ†’ Flow ่ทฏ็”ฑ โ†’ ๆตๆก็›ฎ โ†’ ๆไพ›ๅ•† โ†’ ไธŠๆธธ API

ๆ— ๅŒน้… โ†’ 400 ้”™่ฏฏ

้…็ฝฎๆ–นๆณ•

  1. ่ฎฟ้—ฎ้ขๆฟ: http://localhost:8964/routing
  2. Flow ่ทฏ็”ฑ: ๅˆ›ๅปบๆต๏ผˆๅฆ‚ "fast", "opus"๏ผ‰๏ผŒๆทปๅŠ  ๆไพ›ๅ•† โ†’ ่ดฆๅท โ†’ ๆจกๅž‹ ๆก็›ฎ
  3. Account ่ทฏ็”ฑ: ้€‰ๆ‹ฉๅฎ˜ๆ–นๆจกๅž‹๏ผŒ้…็ฝฎ่ดฆๅท้กบๅบ๏ผŒๆŒ‰้œ€ๅผ€ๅฏ Smart Switch
  4. ไฝฟ็”จๆต: ่ฎพ็ฝฎ "model": "route:<ๆตๅ็งฐ>" ๆˆ–็›ดๆŽฅไฝฟ็”จๆตๅ
  5. ไฝฟ็”จๅฎ˜ๆ–นๆจกๅž‹: ็›ดๆŽฅ่ฏทๆฑ‚ๅฎ˜ๆ–นๆจกๅž‹ ID๏ผˆๅฆ‚ claude-sonnet-4-5๏ผ‰

Flow ้กบๅบ๏ผšๆŒ‰้…็ฝฎ้กบๅบๅฐ่ฏ•๏ผŒ429 ๆ—ถๅˆ‡ๆขไธ‹ไธ€ไธชใ€‚ Account ่ทฏ็”ฑ๏ผšSmart Switch ๅผ€ๅฏไธ”ๆœช้…็ฝฎๆก็›ฎๆ—ถ๏ผŒๆŒ‰่ดฆๅทๅˆ›ๅปบ้กบๅบ่‡ชๅŠจๅฑ•ๅผ€ใ€‚


่ฟœ็จ‹่ฎฟ้—ฎ

ๅฐ†ๆœฌๅœฐ Anti-API ๆšด้œฒๅˆฐๅ…ฌ็ฝ‘๏ผŒๆ”ฏๆŒ่ทจ่ฎพๅค‡่ฎฟ้—ฎ๏ผš

  • ็งปๅŠจๅผ€ๅ‘ - iOS/Android ๆต‹่ฏ• AI ้›†ๆˆ
  • ๅ›ข้˜Ÿๅ…ฑไบซ - ไธŽ้˜Ÿๅ‹ๅ…ฑไบซ้…้ข
  • ๅค–้ƒจๅทฅๅ…ท - ่ฟžๆŽฅ้œ€่ฆๅ…ฌ็ฝ‘ URL ็š„ AI ๅทฅๅ…ท

้šง้“ๅฏนๆฏ”

้šง้“ ้œ€่ฆ่ดฆๅท ็จณๅฎšๆ€ง ้€Ÿๅบฆ
ngrok ๆ˜ฏ๏ผˆๅ…่ดนๅฑ‚๏ผ‰ ๆœ€ไฝณ ๅฟซ
cloudflared ๅฆ ่‰ฏๅฅฝ ไธญ
localtunnel ๅฆ ไธ€่ˆฌ ๆ…ข

่ฎพ็ฝฎๆ–นๆณ•

  1. ่ฎฟ้—ฎ้ขๆฟ: http://localhost:8964/remote-panel
  2. ้…็ฝฎ (ngrok): ่พ“ๅ…ฅ ngrok.com ็š„ authtoken
  3. ๅฏๅŠจ้šง้“: ็‚นๅ‡ปๅฏๅŠจ๏ผŒ็ญ‰ๅพ…ๅ…ฌ็ฝ‘ URL
  4. ไฝฟ็”จ่ฟœ็จ‹ URL: ็”จ้šง้“ URL ๆ›ฟๆข localhost:8964

ๅฎ‰ๅ…จๆ็คบ: ไปปไฝ•ไบบๆ‹ฅๆœ‰้šง้“ URL ๅณๅฏ่ฎฟ้—ฎๆ‚จ็š„ API๏ผŒ่ฏทๅฆฅๅ–„ไฟ็ฎกใ€‚

่ฎพ็ฝฎ้ขๆฟ

่ฎฟ้—ฎ http://localhost:8964/settings ้…็ฝฎ๏ผš

  • ่‡ชๅŠจๆ‰“ๅผ€้ขๆฟ: ๅฏๅŠจๆ—ถๆ‰“ๅผ€้…้ข้ขๆฟ
  • ่‡ชๅŠจๅฏๅŠจ ngrok: ่‡ชๅŠจๅฏๅŠจ้šง้“
  • ๆจกๅž‹ๅๅฅฝ: ่ฎพ็ฝฎๅŽๅฐไปปๅŠก้ป˜่ฎคๆจกๅž‹

ๆ”ฏๆŒ็š„ๆจกๅž‹

Antigravity

ๆจกๅž‹ 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 ้ซ˜่ดจ้‡

GitHub Copilot

ๆจกๅž‹ 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

ChatGPT Codex

ๆจกๅž‹ 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

Zed Hosted Models

ๆจกๅž‹ ID ่ฏดๆ˜Ž
ๅŠจๆ€ๆ‹‰ๅ– ๆŒ‰่ดฆๅทไปŽ Zed ๅฎžๆ—ถๅŒๆญฅๆจกๅž‹ๅˆ—่กจ
ๅ…ฑไบซ hosted access ๆ‰€ๆœ‰ๆ‰˜็ฎกๆจกๅž‹ๅ…ฑ็”จๅŒไธ€ hosted ็Šถๆ€/ๅ‘จๆœŸ

API ็ซฏ็‚น

็ซฏ็‚น ่ฏดๆ˜Ž
POST /v1/chat/completions OpenAI Chat API
POST /v1/messages Anthropic Messages API
GET /quota ้…้ข้ขๆฟ
GET /routing ่ทฏ็”ฑ้…็ฝฎ
GET /settings ่ฎพ็ฝฎ้ขๆฟ
GET /remote-panel ้šง้“ๆŽงๅˆถ

ไปฃ็ ่ดจ้‡

  • ๅ•ๅ…ƒๆต‹่ฏ• - ๆ ธๅฟƒ้€ป่พ‘ๅฎŒๆ•ดๆต‹่ฏ•
  • ่พ“ๅ…ฅ้ชŒ่ฏ - ่ฏทๆฑ‚้ชŒ่ฏไฟ้šœๅฎ‰ๅ…จ
  • ๅ“ๅบ”ๆ—ถ้—ดๆ—ฅๅฟ— - ๆ€ง่ƒฝ็›‘ๆŽง
  • ๅธธ้‡้›†ไธญ็ฎก็† - ๆ— ้ญ”ๆณ•ๆ•ฐๅญ—

่ฏฆ็ป†ๆ–‡ๆกฃ่ง docs/ ๆ–‡ไปถๅคนใ€‚

ๅผ€ๆบๅ่ฎฎ

MIT

About

Turn Antigravity / codex / github copilot into Anthropic & Openai API compatible server. Usable with Claude Code / Xcode etc.

Resources

License

Contributing

Stars

481 stars

Watchers

4 watching

Forks

Packages

 
 
 

Contributors