Skip to main content

Antigravity OpenAI-Compatible Proxy

A small FastAPI wrapper that accepts OpenAI-compatible requests and invokes the local agy CLI. For a chat request selecting claude-sonnet-4-6, it runs agy --model claude-sonnet-4-6 --prompt "...". /v1/models runs agy models and exposes the returned model IDs. The CLI owns sign-in/OAuth; model names are passed through unchanged.

Run on Termux (Android)

Install Python and unzip in Termux if needed. The agy command must already be installed, available in Termux's PATH, and signed in:

pkg update
pkg install python unzip

Unzip the project, enter its folder, install the package and dependencies, then start it:

unzip antigravity-proxy.zip
cd antigravity-proxy
cp .env.example .env
python -m pip install .
antigravity-proxy

The defaults are AGY_EXECUTABLE=agy and PROXY_PORT=8000. Change these in .env if needed. For a local development run instead of installing, use python main.py.

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.

Build and upload to PyPI from Termux

PyPI does not accept a project-source ZIP as a Twine upload. Twine uploads the source distribution and wheel built from this project. From the unzipped project directory:

python -m pip install --upgrade build twine
python -m build
python -m twine upload dist/*

Twine will prompt for credentials. For a PyPI API token, enter __token__ as the username and the complete token (including the pypi- prefix) as the password. Create the project/token on PyPI first. The name antigravity-proxy must be available on PyPI; if it is already taken, change project.name in pyproject.toml to an available name and rebuild before uploading.

Metadata

Release files for antigravity-proxy 0.1.1

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.1
File Size Uploaded Provenance Actions
antigravity_proxy-0.1.1.tar.gz 4.5 kB Without provenance Details for antigravity_proxy-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 9.3 kB

Release files / antigravity_proxy-0.1.1.tar.gz

Download URL antigravity_proxy-0.1.1.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9ecb10c54c1ab4976b52b2ce032fbb78b89fe4aa362cdccfc36ffd2cd911dea7
BLAKE2b-256 checksum
How to use checksums
ffa22e708934e5e799516120f90f205b2d678091de6935e5b339a70797d3592f
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.1-py3-none-any.whl

Download URL antigravity_proxy-0.1.1-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6ef87c379cde78a9f06070f1b4453fa9411bec6b9601b23111b0477b9142e9df
BLAKE2b-256 checksum
How to use checksums
807241b5c946a0a148d7402b31c570d10957207ee812faf4f8c8f21d7ca366ac
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.1

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