Skip to main content

zkai-cli

Provider node management CLI for ZKai — the verifiable AI inference marketplace on 0G chain.

This package installs the zkai command, which automates everything a provider needs: wallet setup, container lifecycle (Docker Compose), and on-chain registration against the ZKai contracts deployed on 0G mainnet.

Install

pip install zkai-cli

Quick start

Becoming a provider takes 4 commands:

# 1. Initial setup — prompts for an EVM private key, writes .env
zkai init

# 2. Start the provider (bridge + TDX-attested enclave)
zkai start

# 3. Verify it's running
zkai status

# 4. Register on-chain — your wallet becomes your provider ID
zkai register --model qwen2.5:1.5b --price 100

Your node is now discoverable by ZKai consumers. Every inference you serve pays you native 0G straight to your wallet.

Commands

Command Purpose
zkai init First-time setup wizard (wallet, .env, relay config).
zkai start Bring up the provider containers via docker compose.
zkai stop Stop and remove containers.
zkai restart [service] Restart all or one of: bridge, enclave.
zkai status Show container health, wallet sync, enclave state, dashboard URL.
zkai logs [service] Tail logs from a service.
zkai register Register the provider in the on-chain ProviderRegistry.
zkai deregister Remove the provider from the on-chain registry.
zkai info Print local provider metadata.
zkai keys Print API key management info.

Run zkai --help for the full reference.

Requirements

  • Linux machine with Docker Engine + Compose plugin (Docker Desktop on macOS works too).
  • An EVM-compatible wallet with a small amount of native 0G for gas. Get testnet 0G from faucet.0g.ai.
  • A model you want to serve (qwen2.5:1.5b is the default; any Ollama model works).

How it fits together

ZKai providers run two containers:

  • bridge — Node.js sidecar that wraps ethers.js and talks to 0G chain on your behalf. Registers, attests, and accepts payment.
  • enclave — Python/FastAPI service running inside a Gramine TDX-sealed runtime, serving an OpenAI-compatible inference endpoint.

The CLI hides all of this behind a few commands. Edit provider/.env if you need to override the model, gateway URL, or relay endpoint.

Links

License

MIT

Release files for zkai-cli 0.5.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 zkai-cli 0.5.1
File Size Uploaded
zkai_cli-0.5.1.tar.gz 12.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zkai-cli 0.5.1
File Interpreter ABI Platform
zkai_cli-0.5.1-py3-none-any.whl Python 3 none any Details

Total release size: 27.8 kB

Release files / zkai_cli-0.5.1.tar.gz

Download URL zkai_cli-0.5.1.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
790bd71edbf58ad0198abf170490fc185dfc1e211d4e86bb8bb9bcb9f35b30e4
BLAKE2b-256 checksum
How to use checksums
e613e2b8c807b2739546f4fd3ac0f21ca1073d6a5c5204b081c8053e26e4d9a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / zkai_cli-0.5.1-py3-none-any.whl

Download URL zkai_cli-0.5.1-py3-none-any.whl
Size 15.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8a4c15525a6fb52d9c79e85920d22f299e1a0517dacf88eb62cdec2c98a5f50
BLAKE2b-256 checksum
How to use checksums
e630e6d29678f826a19567372095169726dde8688aa77c4652f4e312d85ed638
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

0.5.1 This release

2 release files

0.5.0

2 release files

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