Skip to main content

Antigravity OpenAI-Compatible Proxy

A small FastAPI wrapper that accepts OpenAI-compatible requests and invokes the local agy CLI. A chat request passes its requested model to agy --model <model> --prompt <prompt>. /v1/models runs agy models and exposes the returned model IDs. Antigravity CLI handles sign-in; model names are passed through unchanged.

Run on Termux (Android)

The agy command must already be installed, available in Termux's PATH, and signed in. Install the proxy from PyPI:

pkg update
pkg install python
python -m pip install --upgrade antigravity-proxy
antigravity-proxy --web

Then open http://127.0.0.1:8091/index.html in a browser. The UI gets the model list from agy models and sends chat requests through the same local proxy. The --web mode binds only to 127.0.0.1:8091.

To make the UI available to other devices on your local network, run:

antigravity-proxy --web-lan

On another device, open http://<TERMUX-DEVICE-LAN-IP>:8091/index.html (find the Android device's LAN IP in its Wi-Fi details). LAN mode listens on all network interfaces and has no authentication; only use it on a trusted network. To run the API without the UI, start antigravity-proxy; it listens on port 8000 by default.

To configure the CLI executable or API port, create a .env file in the directory where you start the command. Defaults are AGY_EXECUTABLE=agy and PROXY_PORT=8000:

printf 'AGY_EXECUTABLE=agy\nPROXY_PORT=8000\n' > .env

To run from an unpacked source checkout instead, install its dependencies with python -m pip install . and start it with python main.py --web or python main.py --web-lan.

Test the proxy:

curl http://127.0.0.1:8000/health
curl http://127.0.0.1:8000/v1/models
curl -N http://127.0.0.1:8000/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"YOUR_MODEL","messages":[{"role":"user","content":"Hello"}],"stream":true}'

/health runs agy models and returns HTTP 200 if the command succeeds, or 503 if it cannot start or returns an error. Chat requests execute agy --model <model> --prompt <prompt> without shell interpolation. Streaming requests are returned as SSE while stdout is produced by the CLI.

Metadata

Release files for antigravity-proxy 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for antigravity-proxy 0.1.4
File Size Uploaded Provenance Actions
antigravity_proxy-0.1.4.tar.gz 6.8 kB Without provenance Details for antigravity_proxy-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for antigravity-proxy 0.1.4
File Interpreter ABI Platform Actions
antigravity_proxy-0.1.4-py3-none-any.whl Python 3 none any Details for antigravity_proxy-0.1.4-py3-none-any.whl

Total release size: 14.0 kB

Release files / antigravity_proxy-0.1.4.tar.gz

Download URL antigravity_proxy-0.1.4.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7c338016c86c34fb54f4d5900de202195eeb6a1455744c5e86c40a789e18a7f5
BLAKE2b-256 checksum
How to use checksums
e5fadef2075ca378390e348863e74432287bafd8dd480764b6e613a0b62ca561
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / antigravity_proxy-0.1.4-py3-none-any.whl

Download URL antigravity_proxy-0.1.4-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dfdb134219f690413806f84bccfa2cd3acb56ab8a7aa0cca25587265aa9a17b3
BLAKE2b-256 checksum
How to use checksums
d704c57b726e3d265a39134fb7cbf2ae2593db59631f27c666de13369eb054e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for antigravity-proxy 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page