kiapi-proxy
kiapi-proxy is a proxy server that accepts HTTP requests, forwards them to a
kiapi instance over a relay, and returns the
result. It relays every kiapi endpoint:
- JSON responses
- file / binary responses
- chat
text/event-streamresponses (re-emitted as Server-Sent Events)
kiapi only runs on capable Apple Silicon Macs, but kiapi-proxy runs on Linux,
Windows, and resource-constrained Macs. It depends only on kiapi-relay (not on
kiapi or MLX), so it installs without any heavy inference dependencies.
Installation
pip install kiapi-proxy
# With the GCP relay backend
pip install "kiapi-proxy[relay-gcp]"
Usage
Configure the relay (shared with kiapi via KIAPI_RELAY_* environment variables),
then start the proxy:
# Forward through the local filesystem relay
export KIAPI_RELAY_DEFAULT=local
export KIAPI_RELAY_LOCAL_ROOT=/shared/kiapi/relay
kiapi-proxy run --host 0.0.0.0 --port 8080
# or pick the relay explicitly:
kiapi-proxy run --relay local
Then call it as if it were kiapi:
curl http://localhost:8080/health
curl http://localhost:8080/openapi.json
curl -X POST http://localhost:8080/v1/chat/completions \
-H 'content-type: application/json' \
-d '{"messages":[{"role":"user","content":"hello"}],"stream":true}'
Command line interface
kiapi-proxy mirrors the kiapi command layout, with its own settings file and
service registration so the proxy is managed independently from kiapi.
kiapi-proxy run # start the proxy server
kiapi-proxy check # check the relay link to kiapi without starting the server
kiapi-proxy config # manage the user settings file
kiapi-proxy service # manage the launchd user service (macOS)
Settings file
The proxy keeps its own user settings file, separate from kiapi's:
kiapi-proxy config init # create it if it does not exist
kiapi-proxy config show # print the current file
kiapi-proxy config edit # open it in $EDITOR / $VISUAL
kiapi-proxy config template # print the full commented template
The file lives in the user config directory (for example
~/.config/kiapi-proxy/settings.yaml) and holds the proxy settings
(kiapi_proxy.api) and the relay settings (kiapi_relay). Values set here are
loaded on every command; environment variables still take precedence.
Health check
Confirm that requests can travel over the relay to a live kiapi node without starting the proxy server:
kiapi-proxy check --relay local
kiapi-proxy check --relay gcp
check sends a single request (default /health) through the relay and prints
the response. Use --path to probe another endpoint and --timeout to bound the
wait. Without --relay it falls back to the configured proxy/relay default. It
reuses the proxy's persistent relay node ID and holds the single-instance lock,
so it fails fast if the proxy server is already running.
Service (macOS)
Register a launchd user agent (io.github.kiarina.kiapi-proxy) that runs
kiapi-proxy run, independent from the kiapi service:
kiapi-proxy service install
kiapi-proxy service start
kiapi-proxy service status # includes an end-to-end /health probe through the relay
kiapi-proxy service stop
kiapi-proxy service uninstall
Configuration
| Environment variable | Default | Description |
|---|---|---|
KIAPI_PROXY_HOST |
127.0.0.1 |
Bind host. |
KIAPI_PROXY_PORT |
8080 |
Bind port. |
KIAPI_PROXY_RELAY |
(relay default) | Relay specifier to forward through. Falls back to KIAPI_RELAY_DEFAULT. |
KIAPI_PROXY_REQUEST_TIMEOUT_S |
1800 |
Maximum time to wait for a relayed response. |
Relay backends are configured through kiapi-relay (KIAPI_RELAY_*). See the
kiapi-relay documentation.
License
MIT
Metadata
Release files for kiapi-proxy 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kiapi_proxy-0.5.0.tar.gz | 16.6 kB | With provenance | Details for kiapi_proxy-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kiapi_proxy-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for kiapi_proxy-0.5.0-py3-none-any.whl |
Total release size: 39.3 kB
Release files / kiapi_proxy-0.5.0.tar.gz
| Download URL | kiapi_proxy-0.5.0.tar.gz |
|---|---|
| Size | 16.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fa69f13462f9a73cfe1e0b906a7f8c824e5b13d11970f71a24464e92c3115ff2
|
|
BLAKE2b-256 checksum How to use checksums |
f18979be865f260ce0d11bb8e7b7d5eb6df967c20f91efef1a04fe471d95f4a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 11, 2026.
Transparency logRelease files / kiapi_proxy-0.5.0-py3-none-any.whl
| Download URL | kiapi_proxy-0.5.0-py3-none-any.whl |
|---|---|
| Size | 22.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6914252e7e37e49ed55cc22bee710966390c46309eab04c11d39c8f3a61e4140
|
|
BLAKE2b-256 checksum How to use checksums |
d74963b5f7d68dff133a385e1400959c66d32792ab5655a63f48e3d7bcfeca10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 11, 2026.
Transparency logSecurity for kiapi-proxy 0.5.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for kiapi_proxy-0.5.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 11, 2026.
Transparency logA 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.