返回顶部
0

0g-compute

Use cheap, TEE-verified AI models from the 0G Compute Network as OpenClaw providers. Discover available models and compare pricing vs OpenRouter, verify provider integrity via hardware attestation (Intel TDX), manage your 0G wallet and sub-accounts, and configure models in OpenClaw with one workflow. Supports DeepSeek, GLM-5, Qwen, and other models available on the 0G marketplace.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.2
安全检测
已通过
850
下载量
0
收藏
概述
安装方式
版本历史

0g-compute

# 0G Compute Network Interface with the 0G Compute Network — a decentralized AI inference marketplace with TEE-verified model integrity. ## Prerequisites - `0g-compute-cli` installed: `npm i -g @0glabs/0g-serving-broker` - Note: npm package name is `@0glabs/0g-serving-broker` (the old `@0glabs/0g-compute-cli` package name no longer resolves), but the binary command is still `0g-compute-cli`. - Wallet funded with 0G tokens - Logged in: avoid passing key on the command line when possible (it can be visible in shell history/process list). Prefer reading from a protected prompt/env: - `read -s OG_PK; 0g-compute-cli login --private-key "$OG_PK"; unset OG_PK` - Network configured: `0g-compute-cli setup-network` ## Core Workflows ### 1. Discover Models ```bash # List all providers with models, prices, verifiability 0g-compute-cli inference list-providers # Detailed view with health/uptime metrics 0g-compute-cli inference list-providers-detail # Include providers without valid TEE signer 0g-compute-cli inference list-providers --include-invalid ``` Filter output by model name, price, health status, and TeeML support (models running in Trusted Execution Environment). ### 2. Verify Provider Integrity **Always verify before trusting a new provider.** TEE verification ensures the model runs in a secure enclave with hardware-attested integrity. ```bash # Full TEE attestation check 0g-compute-cli inference verify --provider <address> # Download raw attestation data 0g-compute-cli inference download-report --provider <address> --output report.json ``` The verify command checks: - TEE signer address matches contract - Docker Compose hash integrity - DStack TEE (Intel TDX) attestation ### 3. Wallet & Balance ```bash # Account overview 0g-compute-cli get-account # Per-provider sub-account balance 0g-compute-cli get-sub-account --provider <address> --service inference # Fund operations 0g-compute-cli deposit --amount <0G> # To main account 0g-compute-cli transfer-fund --provider <addr> --amount <0G> --service inference # To sub-account 0g-compute-cli retrieve-fund --service inference # From sub-accounts 0g-compute-cli refund --amount <0G> # Withdraw to wallet ``` **Important**: Inference calls fail if sub-account balance is depleted. Monitor balances regularly. ### 4. Configure OpenClaw Provider Get API key from a verified provider (interactive — prompts for expiration): ```bash 0g-compute-cli inference get-secret --provider <address> ``` Add to `openclaw.json`: ```json "providers": { "0g-<model-name>": { "baseUrl": "<provider-url>/v1/proxy", "apiKey": "<secret>", "api": "openai-completions", "models": [{ "id": "<model-id>", "name": "<display-name>" }] } } ``` Register in `agents.defaults.models` with an alias. Set `cost: 0` since billing is on-chain. **See [references/openclaw-config.md](references/openclaw-config.md) for complete setup guide.** ### 5. Price Comparison (0G vs OpenRouter) Compare 0G pricing against OpenRouter for the same models: ```bash scripts/0g-price-compare.sh ``` No API keys needed — uses public endpoints: - CoinGecko for 0G token → USD price - OpenRouter `/api/v1/models` for model pricing - 0G CLI for provider pricing Shows side-by-side USD/1M tokens with savings percentage. Set `OG_TOKEN_PRICE_USD` env var to override CoinGecko price. ### 6. Status Check ```bash # Login status & wallet 0g-compute-cli status # Current network (mainnet/testnet) 0g-compute-cli show-network ``` ## Safety Guidelines - Always run `inference verify` on new providers before use - Check provider health/uptime before relying on them - Monitor sub-account balances — depleted funds cause inference failures - Private key stored in `~/.0g-compute-cli/config.json` — never expose this file ## Reference Documentation - **[CLI Reference](references/cli-reference.md)** — Complete command reference with all flags and examples - **[OpenClaw Config](references/openclaw-config.md)** — Step-by-step provider setup guide

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 0g-compute-1776419932 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 0g-compute-1776419932 技能

通过命令行安装

skillhub install 0g-compute-1776419932

下载 Zip 包

⬇ 下载 0g-compute v1.0.2

文件大小: 8.32 KB | 发布时间: 2026-4-17 18:08

v1.0.2 最新 2026-4-17 18:08
Security hardening docs: add structured install metadata (requires/install), and safer login guidance to avoid exposing private key in history/process list.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部