[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77YQFP62GS94Q6D3QGG6T5D":3,"skill-same:01M77YQFP62GS94Q6D3QGG6T5D":88},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":66,"commitSha":67,"skillDirectory":68,"forksCount":69,"repositoryHtmlUrl":70,"repositoryHomepageUrl":71,"ownerHtmlUrl":72,"ownerBlogUrl":6,"ownerDescription":73,"updatedAt":74,"install":75,"resources":87},"01M77YQFP62GS94Q6D3QGG6T5D","x402-compute",null,"This skill should be used when the user asks to \"provision GPU instance\",\n\"spin up a cloud server\", \"list compute plans\", \"browse GPU pricing\",\n\"extend compute instance\", \"resize compute instance\", \"destroy server instance\", \"check instance status\",\n\"list my instances\", \"top up compute credits\", \"check credit balance\",\n\"run inference on the grid\", \"decentralized inference\", \"OpenAI-compatible API\",\n\"confidential \u002F TEE inference\", \"list grid models\", \"check grid capacity\",\n\"run a node\", \"provide compute\", \"become a grid node\", \"node operator\", \"join the grid\",\n\"stake to run a node\", \"serve a model on the grid\", \"earn from compute\",\nor manage Singularity Cloud Network compute. Three jobs: SGL Machines\n(GPU\u002FVPS provisioning across Vultr & DigitalOcean), SGL Grid (decentralized,\nconfidential, OpenAI-compatible inference — consume it), and Provide Compute\n(run a TEE node on the grid to serve inference and earn USDC + SGL). Pay with\nUSDC on Base or Solana, USDm on MegaETH via x402, optional MPP\u002FMppx, or\npre-loaded USD credits. Includes optional OWS-backed auth and management flows.","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fx\u002Fx402-compute\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: x402-compute\nversion: 1.6.0\ndescription: |\n  This skill should be used when the user asks to \"provision GPU instance\",\n  \"spin up a cloud server\", \"list compute plans\", \"browse GPU pricing\",\n  \"extend compute instance\", \"resize compute instance\", \"destroy server instance\", \"check instance status\",\n  \"list my instances\", \"top up compute credits\", \"check credit balance\",\n  \"run inference on the grid\", \"decentralized inference\", \"OpenAI-compatible API\",\n  \"confidential \u002F TEE inference\", \"list grid models\", \"check grid capacity\",\n  \"run a node\", \"provide compute\", \"become a grid node\", \"node operator\", \"join the grid\",\n  \"stake to run a node\", \"serve a model on the grid\", \"earn from compute\",\n  or manage Singularity Cloud Network compute. Three jobs: SGL Machines\n  (GPU\u002FVPS provisioning across Vultr & DigitalOcean), SGL Grid (decentralized,\n  confidential, OpenAI-compatible inference — consume it), and Provide Compute\n  (run a TEE node on the grid to serve inference and earn USDC + SGL). Pay with\n  USDC on Base or Solana, USDm on MegaETH via x402, optional MPP\u002FMppx, or\n  pre-loaded USD credits. Includes optional OWS-backed auth and management flows.\nhomepage: https:\u002F\u002Fdocs.x402layer.cc\u002Fagentic-access\u002Fx402-compute\nmetadata:\n  clawdbot:\n    emoji: \"🖥️\"\n    homepage: https:\u002F\u002Fcloud.x402compute.cc\n    os:\n      - linux\n      - darwin\n    requires:\n      bins:\n        - python3\n      env:\n        - name: PRIVATE_KEY\n          description: EVM private key for Base\u002FMegaETH payment signing (use a dedicated low-balance wallet)\n          sensitive: true\n          optional: true\n        - name: WALLET_ADDRESS\n          description: EVM wallet address corresponding to PRIVATE_KEY\n          optional: true\n        - name: SOLANA_SECRET_KEY\n          description: Solana signer key for Solana payment signing (use a dedicated low-balance wallet)\n          sensitive: true\n          optional: true\n        - name: SOLANA_WALLET_ADDRESS\n          description: Solana wallet address\n          optional: true\n        - name: COMPUTE_API_KEY\n          description: Reusable API key for management endpoints (created via POST \u002Fcompute\u002Fapi-keys)\n          sensitive: true\n          optional: true\n        - name: COMPUTE_AUTH_CHAIN\n          description: Auth chain override — base, megaeth, or solana\n          optional: true\n        - name: OWS_BIN\n          description: Explicit path to a locally installed OWS binary (avoids runtime npx downloads)\n          optional: true\nallowed-tools:\n  - Read\n  - Write\n  - Edit\n  - Bash\n  - WebFetch\n---\n\n\n# Singularity Cloud Network — Compute & Grid\n\nTwo products, one credit balance, one set of wallet\u002FAPI-key auth:\n\n- **SGL Machines** — provision, manage, resize, and extend GPU\u002FVPS instances on Vultr or DigitalOcean. **API base:** `https:\u002F\u002Fcompute.x402layer.cc`\n- **SGL Grid** — decentralized, confidential (TEE), **OpenAI-compatible** inference across attested nodes; token streaming + end-to-end encryption. **API base:** `https:\u002F\u002Fgrid.x402compute.cc` (see [SGL Grid — Inference](#sgl-grid--inference) below)\n- **Provide Compute (run a node)** — turn a TEE-capable machine into a grid node: stake $SGL, register, attest, serve a model, earn USDC + SGL. Agentic via the `sgl` CLI. See [Provide Compute](#provide-compute-run-a-node) below and `references\u002Fnode-operator.md`.\n- **SGL Processors** — serverless TEE functions. *Coming soon.*\n\nPay with x402, MPP, or pre-loaded credits — the same `x402c_…` API key and prepaid credit balance work across Machines and Grid.\n\n**x402 Networks:** Base (EVM) • Solana • MegaETH\n**x402 Currency:** USDC (Base\u002FSolana) • USDm (MegaETH)\n**MPP Methods:** Tempo • Stripe\u002Fcard when enabled by the service\n**Credits:** Pre-load USD via x402 topup, then provision\u002Fextend (`use_credits: true`) or call the Grid with `X-API-Key`\n**Protocol:** HTTP 402 Payment Required (`X-Payment` for x402, `Authorization: Payment` for MPP)\n**$SGL:** native token, live on Solana — mint `5c4HyD2rSShqnTsf5z3SaoD2H3GE452u2CUuYjviBAGS` (staking secures the grid; see [staking.x402layer.cc](https:\u002F\u002Fstaking.x402layer.cc))\n\nThis section below (Machines) covers provisioning. Jump to **[SGL Grid — Inference](#sgl-grid--inference)** for the OpenAI-compatible inference API.\n\n**Access Note:** Preferred access is SSH public key. If no SSH key is provided, a one-time password fallback can be fetched once via API.\n**DigitalOcean Note:** DigitalOcean instances require SSH key access because one-time root passwords are not exposed through the DigitalOcean API.\n\n---\n\n## Quick Start\n\n### 1. Install Dependencies\n```bash\npip install -r {baseDir}\u002Frequirements.txt\n```\n\n### 2. Choose Wallet Mode\n\n#### Option A: Direct signing keys (Base, MegaETH, or Solana)\n\n> **Use a dedicated low-balance wallet.** Never use your primary custody wallet.\n\n```bash\n# Base (EVM) — same keys work for MegaETH\nexport PRIVATE_KEY=\u003Cyour-evm-private-key>\nexport WALLET_ADDRESS=\u003Cyour-evm-wallet-address>\n\n# MegaETH (uses same EVM keys as Base)\nexport PRIVATE_KEY=\u003Cyour-evm-private-key>\nexport WALLET_ADDRESS=\u003Cyour-evm-wallet-address>\nexport COMPUTE_AUTH_CHAIN=\"megaeth\"\n\n# Solana\nexport SOLANA_SECRET_KEY=\u003Cyour-solana-secret-key>\nexport SOLANA_WALLET_ADDRESS=\u003Cyour-solana-wallet-address>\nexport COMPUTE_AUTH_CHAIN=\"solana\"\n```\n\n#### Option B: OpenWallet \u002F OWS (optional-first)\n```bash\nnpm install -g @open-wallet-standard\u002Fcore@0.5.0\nexport OWS_WALLET=\"compute-wallet\"\nexport COMPUTE_AUTH_MODE=\"ows\"\n```\n\nCreate `COMPUTE_API_KEY` (optional) for management endpoints:\n```bash\npython {baseDir}\u002Fscripts\u002Fcreate_api_key.py --label \"my-agent\"\n```\n\nOWS is best for compute auth and routine management flows. Direct x402 provision and extend still use local payment-signing paths. MPP provision\u002Fextend should use `mppx` or Tempo Wallet.\n\nResize is a management action, not a second payment flow. The API preserves remaining prepaid dollar credit by recalculating `expires_at` for the target hourly rate after the provider accepts the resize.\n\n---\n\n## ⚠️ Security Notice\n\n> **IMPORTANT**: This skill handles private keys for signing blockchain transactions.\n>\n> - **Never use your primary custody wallet** - Create a dedicated wallet with limited funds\n> - **Private keys are used locally only** - They sign transactions locally and are never transmitted\n> - **For testing**: Use a throwaway wallet with minimal USDC\u002FUSDm\n\n---\n\n## Scripts Overview\n\n| Script | Purpose |\n|--------|---------|\n| `browse_plans.py` | List available GPU\u002FVPS plans with pricing |\n| `browse_regions.py` | List deployment regions |\n| `provision.py` | Provision a new instance (x402 payment, `--months` or `--days`) |\n| `create_api_key.py` | Create an API key for agent access (optional) |\n| `list_instances.py` | List your active instances |\n| `instance_details.py` | Get details for a specific instance |\n| `get_one_time_password.py` | Retrieve one-time root password fallback |\n| `extend_instance.py` | Extend instance lifetime (x402 payment) |\n| `resize_instance.py` | Resize an instance in place (compute auth only) |\n| `destroy_instance.py` | Destroy an instance |\n| `ows_cli.py` | Run OpenWallet \u002F OWS wallet, sign-message, and key commands |\n| `solana_signing.py` | Internal helper for Solana x402 payment signing |\n\n---\n\n## Instance Lifecycle\n\n```\nBrowse Plans → Choose Provider\u002FPlan → Provision (x402\u002FMPP\u002FCredits) → Active → Extend \u002F Destroy → Expired\n```\n\nInstances expire after their prepaid duration. Extend before expiry to keep them running.\n\n---\n\n## Workflows\n\n### A. Browse and Provision\n\n```bash\n# List GPU plans\npython {baseDir}\u002Fscripts\u002Fbrowse_plans.py\n\n# Filter by type (gpu\u002Fvps\u002Fhigh-performance)\npython {baseDir}\u002Fscripts\u002Fbrowse_plans.py --type vcg\n\n# Check available regions\npython {baseDir}\u002Fscripts\u002Fbrowse_regions.py\n\n# Generate a dedicated SSH key once (recommended for agents)\nssh-keygen -t ed25519 -N \"\" -f ~\u002F.ssh\u002Fx402_compute\n\n# Provision an instance for 1 month (triggers x402 payment)\npython {baseDir}\u002Fscripts\u002Fprovision.py vcg-a100-1c-2g-6gb lax --months 1 --label \"my-gpu\" --ssh-key-file ~\u002F.ssh\u002Fx402_compute.pub\n\n# DigitalOcean plans are prefixed with do:\n# They require SSH key access.\npython {baseDir}\u002Fscripts\u002Fprovision.py do:s-1vcpu-1gb nyc3 --days 1 --label \"do-test\" --ssh-key-file ~\u002F.ssh\u002Fx402_compute.pub\n\n# Provision a daily instance (cheaper, use-and-throw)\npython {baseDir}\u002Fscripts\u002Fprovision.py vc2-1c-1gb ewr --days 1 --label \"test-daily\" --ssh-key-file ~\u002F.ssh\u002Fx402_compute.pub\n\n# Provision for 3 days\npython {baseDir}\u002Fscripts\u002Fprovision.py vc2-1c-1gb ewr --days 3 --label \"short-task\" --ssh-key-file ~\u002F.ssh\u002Fx402_compute.pub\n\n# Provision on Solana\npython {baseDir}\u002Fscripts\u002Fprovision.py vc2-1c-1gb ewr --months 1 --label \"my-sol-vps\" --network solana --ssh-key-file ~\u002F.ssh\u002Fx402_compute.pub\n\n# Provision on MegaETH (pays with USDm)\npython {baseDir}\u002Fscripts\u002Fprovision.py vc2-1c-1gb ewr --months 1 --label \"my-mega-vps\" --network megaeth --ssh-key-file ~\u002F.ssh\u002Fx402_compute.pub\n\n# Provision via MPP \u002F mppx (Tempo by default; Stripe\u002Fcard if your mppx config supports it)\nnpx mppx https:\u002F\u002Fcompute.x402layer.cc\u002Fcompute\u002Fprovision \\\n  -X POST \\\n  -J '{\"plan\":\"vc2-1c-1gb\",\"region\":\"ewr\",\"os_id\":2284,\"label\":\"mpp-vps\",\"prepaid_hours\":24,\"ssh_public_key\":\"ssh-ed25519 AAAA... agent\"}'\n\n# If the response includes management_api_key, store it for later instance management:\nexport COMPUTE_API_KEY=\"x402c_...\"\n\n# ⚠️ After provisioning, wait 2-3 minutes for Vultr to complete setup\n# Then fetch your instance details (IP, status):\npython {baseDir}\u002Fscripts\u002Finstance_details.py \u003Cinstance_id>\n```\n\n### B. Manage Instances\n\n```bash\n# Optional: create a reusable API key (avoids message signing each request)\npython {baseDir}\u002Fscripts\u002Fcreate_api_key.py --label \"my-agent\"\n\n# List all your instances\npython {baseDir}\u002Fscripts\u002Flist_instances.py\n\n# Get details for one instance\npython {baseDir}\u002Fscripts\u002Finstance_details.py \u003Cinstance_id>\n\n# Optional fallback if no SSH key was provided during provisioning\npython {baseDir}\u002Fscripts\u002Fget_one_time_password.py \u003Cinstance_id>\n\n# Extend by 1 day\npython {baseDir}\u002Fscripts\u002Fextend_instance.py \u003Cinstance_id> --hours 24\n\n# Extend by 1 month\npython {baseDir}\u002Fscripts\u002Fextend_instance.py \u003Cinstance_id> --hours 720\n\n# Extend on Solana\npython {baseDir}\u002Fscripts\u002Fextend_instance.py \u003Cinstance_id> --hours 720 --network solana\n\n# Extend on MegaETH (pays with USDm)\npython {baseDir}\u002Fscripts\u002Fextend_instance.py \u003Cinstance_id> --hours 720 --network megaeth\n\n# Extend via MPP. MPP extension requires compute auth; use the management API key\n# returned from MPP provisioning or normal wallet signature auth.\nnpx mppx https:\u002F\u002Fcompute.x402layer.cc\u002Fcompute\u002Finstances\u002F\u003Cinstance_id>\u002Fextend \\\n  -X POST \\\n  -H \"X-API-Key: $COMPUTE_API_KEY\" \\\n  -J '{\"extend_hours\":720}'\n\n# Resize via bundled helper script\npython {baseDir}\u002Fscripts\u002Fresize_instance.py \u003Cinstance_id> vc2-2c-4gb\n\n# Resize in place with management auth only (no x402 or MPP payment)\ncurl -X POST https:\u002F\u002Fcompute.x402layer.cc\u002Fcompute\u002Finstances\u002F\u003Cinstance_id>\u002Fresize \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"X-API-Key: $COMPUTE_API_KEY\" \\\n  -d '{\"plan\":\"vc2-2c-4gb\"}'\n\n# DigitalOcean disk growth is irreversible and must be confirmed explicitly\ncurl -X POST https:\u002F\u002Fcompute.x402layer.cc\u002Fcompute\u002Finstances\u002F\u003Cinstance_id>\u002Fresize \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"X-API-Key: $COMPUTE_API_KEY\" \\\n  -d '{\"plan\":\"do:s-2vcpu-4gb\",\"confirm_disk_resize\":true}'\n\n# Destroy\npython {baseDir}\u002Fscripts\u002Fdestroy_instance.py \u003Cinstance_id>\n```\n\n### C. OpenWallet \u002F OWS\n\n```bash\n# List local OWS wallets\npython {baseDir}\u002Fscripts\u002Fows_cli.py wallet-list\n\n# Sign a Base-compatible compute auth message\npython {baseDir}\u002Fscripts\u002Fows_cli.py sign-message --chain eip155:8453 --wallet compute-wallet --message \"hello\"\n\n# Sign a MegaETH-compatible compute auth message\npython {baseDir}\u002Fscripts\u002Fows_cli.py sign-message --chain eip155:4326 --wallet compute-wallet --message \"hello\"\n\n# Sign a Solana-compatible compute auth message\npython {baseDir}\u002Fscripts\u002Fows_cli.py sign-message --chain solana --wallet compute-wallet --message \"hello\"\n\n# Create an OWS agent key\npython {baseDir}\u002Fscripts\u002Fows_cli.py key-create --name codex-compute --wallet compute-wallet\n```\n\n### D. Credits (payment-free provisioning)\n\n```bash\n# Top up credits via x402 payment (one-time)\ncurl -X POST https:\u002F\u002Fcompute.x402layer.cc\u002Fcompute\u002Fcredits\u002Ftopup \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"X-API-Key: $COMPUTE_API_KEY\" \\\n  -d '{\"amount\": 100, \"network\": \"base\"}'\n# Returns 402 → pay → credits added to wallet balance\n\n# Check credit balance\ncurl https:\u002F\u002Fcompute.x402layer.cc\u002Fcompute\u002Fcredits\u002Fbalance \\\n  -H \"X-API-Key: $COMPUTE_API_KEY\"\n\n# Provision using credits (no x402\u002FMPP payment needed)\ncurl -X POST https:\u002F\u002Fcompute.x402layer.cc\u002Fcompute\u002Fprovision \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"X-API-Key: $COMPUTE_API_KEY\" \\\n  -d '{\n    \"plan\": \"vc2-1c-1gb\",\n    \"region\": \"ewr\",\n    \"os_id\": 2284,\n    \"label\": \"credit-vps\",\n    \"prepaid_hours\": 720,\n    \"ssh_public_key\": \"ssh-ed25519 AAAA... agent\",\n    \"use_credits\": true\n  }'\n\n# Extend using credits\ncurl -X POST https:\u002F\u002Fcompute.x402layer.cc\u002Fcompute\u002Finstances\u002F\u003Cinstance_id>\u002Fextend \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"X-API-Key: $COMPUTE_API_KEY\" \\\n  -d '{\"extend_hours\": 720, \"use_credits\": true}'\n```\n\nCredits are scoped per wallet. If the cloud provider rejects the instance after credits are deducted, the full amount is automatically refunded.\n\n---\n\n## x402 Payment Flow\n\n1. Request provision\u002Fextend → server returns `HTTP 402` with payment requirements\n2. Script signs payment locally:\n   - Base: USDC `TransferWithAuthorization` (EIP-712)\n   - MegaETH: USDm ERC-2612 `permit` (EIP-712) — gasless for the user, facilitator settles on-chain\n   - Solana: signed SPL transfer transaction payload\n3. Script resends request with `X-Payment` header containing signed payload\n4. Server verifies payment, settles on-chain, provisions\u002Fextends instance\n\nMegaETH uses an embedded facilitator (no external CDP dependency). The user signs an off-chain ERC-2612 permit, and the facilitator calls `permit()` + `transferFrom()` on MegaETH (~10ms blocks, near-zero gas).\n\nFor Solana, transient facilitator failures can happen. Retry once or twice if you get a temporary 5xx verify error.\n\n## MPP Payment Flow\n\nMPP is available side-by-side with x402 on the same paid endpoints.\n\n1. Request provision\u002Fextend -> server returns `HTTP 402` with `WWW-Authenticate: Payment`\n2. `mppx` or Tempo Wallet creates an MPP credential\n3. Client retries with `Authorization: Payment ...`\n4. Server verifies the MPP payment, provisions\u002Fextends the instance, and returns `Payment-Receipt`\n\nNotes:\n- `POST \u002Fcompute\u002Fprovision` can be paid via MPP without wallet auth. In that case the response includes `management_api_key`; store it because it is shown once and is required for later management.\n- `POST \u002Fcompute\u002Finstances\u002F:id\u002Fextend` via MPP requires compute auth, usually `X-API-Key: $COMPUTE_API_KEY`.\n- `POST \u002Fcompute\u002Finstances\u002F:id\u002Fresize` uses compute auth only. It preserves remaining prepaid value by changing expiry instead of charging again.\n- x402 remains fully supported through the Python scripts and `X-Payment` header flow.\n- MPP methods are service-configured. Tempo is used by default by `mppx`; Stripe\u002Fcard requires a Stripe-capable MPP client\u002Fconfig.\n\n---\n\n## SGL Grid — Inference\n\nDecentralized, confidential inference across attested TEE nodes — **OpenAI-compatible**, so any OpenAI SDK works by pointing `base_url` at the grid. Requests are end-to-end encrypted and can stream token-by-token.\n\n**API base:** `https:\u002F\u002Fgrid.x402compute.cc`\n**Auth:** `X-API-Key: x402c_…` (billed to your prepaid credits — same key\u002Fcredits as Machines) **or** per-request x402 via `X-Payment`.\n**Billing:** pay-per-token in USDC (credits or x402). No subscription.\n\n| Method | Path | Purpose |\n|--------|------|---------|\n| `GET`  | `\u002Fv1\u002Fmodels` | List models currently served by active attested nodes |\n| `POST` | `\u002Fv1\u002Fchat\u002Fcompletions` | OpenAI-compatible chat (set `\"stream\": true` to stream) |\n| `GET`  | `\u002Fgrid\u002Fcapacity` | Live capacity: active nodes, TEE types, served models, `at_capacity` |\n\n```bash\n# 1) Reuse your compute API key (x402c_…) + prepaid credits, or create one:\npython {baseDir}\u002Fscripts\u002Fcreate_api_key.py --label \"my-agent\"   # → x402c_...\n# Top up credits in the dashboard: Settings → Credits (cloud.x402compute.cc).\n\n# 2) Check what's being served + whether the grid has capacity\ncurl https:\u002F\u002Fgrid.x402compute.cc\u002Fv1\u002Fmodels -H \"X-API-Key: $COMPUTE_API_KEY\"\ncurl https:\u002F\u002Fgrid.x402compute.cc\u002Fgrid\u002Fcapacity            # active_nodes, models, at_capacity\n\n# 3) OpenAI-compatible chat (billed to credits)\ncurl -X POST https:\u002F\u002Fgrid.x402compute.cc\u002Fv1\u002Fchat\u002Fcompletions \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"X-API-Key: $COMPUTE_API_KEY\" \\\n  -d '{\"model\":\"llama-3.2-3b\",\"messages\":[{\"role\":\"user\",\"content\":\"Hello\"}]}'\n\n# Streaming: add \"stream\": true and read the SSE token chunks.\n# Pay-per-request with x402 instead of credits: send the X-Payment header\n# (same 402 → sign → resend flow as provision\u002Fextend) and omit X-API-Key.\n```\n\nUse any **OpenAI SDK** by setting `base_url=https:\u002F\u002Fgrid.x402compute.cc\u002Fv1` and `api_key=$COMPUTE_API_KEY`. Before a large batch, check `\u002Fgrid\u002Fcapacity` and back off \u002F retry if `at_capacity` is true.\n\n---\n\n## Provide Compute (run a node)\n\nThe other side of the grid: turn a **TEE-capable machine** into a node that serves confidential,\nOpenAI-compatible inference and **earns USDC + SGL** per settled job. Fully agentic — the installer\nand the `sgl` CLI are shell commands. Full runbook (requirements, flags, maintenance, slashing,\nearnings) → **`references\u002Fnode-operator.md`**.\n\n**Prerequisites:** a supported TEE (e.g. Apple Secure Enclave `apple_se`, Intel TDX\u002FSGX, AMD SEV-SNP,\nAWS Nitro), `llama.cpp` + a GGUF model, and **≥ 50,000 $SGL staked** to your operator (Solana) wallet.\n\n```bash\n# 1. Stake ≥50,000 SGL to your operator wallet (agentic via the x402-layer skill \u002F Staking Engine API,\n#    or at https:\u002F\u002Fstaking.x402layer.cc). Non-custodial; slashable only for proven tampering.\n\n# 2. Install the node CLI + runtime, get a model\ncurl -sSf https:\u002F\u002Fgrid.x402compute.cc\u002Finstall.sh | sh     # installs `sgl` (Singularity-Layer\u002Fsgl-network-node)\nbrew install llama.cpp                                     # local inference runtime (macOS)\n#   download a GGUF, e.g. ~\u002Fmodels\u002FLlama-3.2-3B-Instruct-Q4_K_M.gguf\n\n# 3. Register the node under the staked wallet (headless \u002F agentic)\nsgl init --wallet \u003CSTAKED_WALLET> --tee-type apple_se --models llama-3.2-3b\n#   (interactive alternative: `sgl login`)\n\n# 4. Attest the enclave (required before jobs; re-run after any binary update)\nsgl attest\n\n# 5. Serve as a background service (production)\nsgl service install \\\n  --model-path ~\u002Fmodels\u002FLlama-3.2-3B-Instruct-Q4_K_M.gguf \\\n  --model-name llama-3.2-3b \\\n  --resource-percent 50\n\n# verify\nsgl status\ncurl https:\u002F\u002Fgrid.x402compute.cc\u002Fgrid\u002Fcapacity            # your node raises active_nodes \u002F models\n```\n\n**Maintenance:** `sgl off-grid` (stop new jobs cleanly for planned downtime — no penalty) \u002F `sgl on-grid`\n(resume). Honest downtime is never slashed; only proven tampering is. Re-run `sgl attest` after binary\nupdates. Docs: `https:\u002F\u002Fdocs.x402layer.cc\u002Fcloud\u002Fprovide\u002Fnode-setup`.\n\n---\n\n## Plan Types\n\n| Type | Plan Prefix | Description |\n|------|-------------|-------------|\n| GPU | `vcg-*` | GPU-accelerated (A100, H100, etc.) |\n| VPS | `vc2-*` | Standard cloud compute |\n| High-Perf | `vhp-*` | High-performance dedicated |\n| Dedicated | `vdc-*` | Dedicated bare-metal |\n| DigitalOcean | `do:*` | DigitalOcean Droplets (provider-prefixed size slugs) |\n\n---\n\n## Environment Reference\n\n| Variable | Required For | Description |\n|----------|--------------|-------------|\n| `PRIVATE_KEY` | Base\u002FMegaETH payment signing | EVM private key (0x...) |\n| `WALLET_ADDRESS` | Base\u002FMegaETH direct-signing mode | EVM wallet address (0x...) |\n| `SOLANA_SECRET_KEY` | Solana direct-signing mode | Solana signer key (base58 or JSON byte array) |\n| `SOLANA_WALLET_ADDRESS` | Solana direct-signing mode | Solana wallet address (optional if derivable from secret) |\n| `COMPUTE_AUTH_CHAIN` | Chain auth override | `base`, `megaeth`, or `solana` |\n| `COMPUTE_API_KEY` | Optional | Reusable API key for compute management endpoints |\n| `COMPUTE_AUTH_MODE` | Optional | `auto`, `private-key`, or `ows` |\n| `OWS_WALLET` | OWS auth mode | OWS wallet name or ID |\n| `OWS_BIN` | OWS auth mode | Optional explicit path to the `ows` executable |\n| `COMPUTE_API_KEY` | MPP\u002Fno-wallet management | API key returned once after an MPP provision without wallet auth |\n\n---\n\n## API Reference\n\nFor full endpoint details, see:\n- [references\u002Fapi-reference.md](references\u002Fapi-reference.md)\n- [references\u002Fopenwallet-ows.md](references\u002Fopenwallet-ows.md)\n\n---\n\n## Resources\n\n- 📖 **Documentation:** [docs.x402layer.cc\u002Fagentic-access\u002Fx402-compute](https:\u002F\u002Fdocs.x402layer.cc\u002Fagentic-access\u002Fx402-compute)\n- 🖥️ **Cloud Network app:** [cloud.x402compute.cc](https:\u002F\u002Fcloud.x402compute.cc) (Machines, Grid, API keys, credits)\n- 🌐 **Singularity Compute:** [x402compute.cc](https:\u002F\u002Fx402compute.cc)\n- 🔑 **Staking:** [staking.x402layer.cc](https:\u002F\u002Fstaking.x402layer.cc) — stake $SGL (min 50,000) to run a node \u002F validate; rewards in USDC + SGL\n- **API bases:** Machines `https:\u002F\u002Fcompute.x402layer.cc` · Grid `https:\u002F\u002Fgrid.x402compute.cc`\n\n---\n\n## OWS scope note\n\nOWS support is optional-first in this release:\n- use it for compute auth and management\u002FAPI-key flows\n- keep direct Base, MegaETH, or Solana signing keys for the paid provision and extend flows\n- resize, list, details, password fallback, and destroy work with normal compute auth \u002F API keys\n","# Singularity Cloud Network — Compute & Grid\n\nTwo products, one credit balance, one set of wallet\u002FAPI-key auth:\n\n- **SGL Machines** — provision, manage, resize, and extend GPU\u002FVPS instances on Vultr or DigitalOcean. **API base:** `https:\u002F\u002Fcompute.x402layer.cc`\n- **SGL Grid** — decentralized, confidential (TEE), **OpenAI-compatible** inference across attested nodes; token streaming + end-to-end encryption. **API base:** `https:\u002F\u002Fgrid.x402compute.cc` (see [SGL Grid — Inference](#sgl-grid--inference) below)\n- **Provide Compute (run a node)** — turn a TEE-capable machine into a grid node: stake $SGL, register, attest, serve a model, earn USDC + SGL. Agentic via the `sgl` CLI. See [Provide Compute](#provide-compute-run-a-node) below and `references\u002Fnode-operator.md`.\n- **SGL Processors** — serverless TEE functions. *Coming soon.*\n\nPay with x402, MPP, or pre-loaded credits — the same `x402c_…` API key and prepaid credit balance work across Machines and Grid.\n\n**x402 Networks:** Base (EVM) • Solana • MegaETH\n**x402 Currency:** USDC (Base\u002FSolana) • USDm (MegaETH)\n**MPP Methods:** Tempo • Stripe\u002Fcard when enabled by the service\n**Credits:** Pre-load USD via x402 topup, then provision\u002Fextend (`use_credits: true`) or call the Grid with `X-API-Key`\n**Protocol:** HTTP 402 Payment Required (`X-Payment` for x402, `Authorization: Payment` for MPP)\n**$SGL:** native token, live on Solana — mint `5c4HyD2rSShqnTsf5z3SaoD2H3GE452u2CUuYjviBAGS` (staking secures the grid; see [staking.x402layer.cc](https:\u002F\u002Fstaking.x402layer.cc))\n\nThis section below (Machines) covers provisioning. Jump to **[SGL Grid — Inference](#sgl-grid--inference)** for the OpenAI-compatible inference API.\n\n**Access Note:** Preferred access is SSH public key. If no SSH key is provided, a one-time password fallback can be fetched once via API.\n**DigitalOcean Note:** DigitalOcean instances require SSH key access because one-time root passwords are not exposed through the DigitalOcean API.\n\n---\n\n## Quick Start\n\n### 1. Install Dependencies\n```bash\npip install -r {baseDir}\u002Frequirements.txt\n```\n\n### 2. Choose Wallet Mode\n\n#### Option A: Direct signing keys (Base, MegaETH, or Solana)\n\n> **Use a dedicated low-balance wallet.** Never use your primary custody wallet.\n\n```bash\n# Base (EVM) — same keys work for MegaETH\nexport PRIVATE_KEY=\u003Cyour-evm-private-key>\nexport WALLET_ADDRESS=\u003Cyour-evm-wallet-address>\n\n# MegaETH (uses same EVM keys as Base)\nexport PRIVATE_KEY=\u003Cyour-evm-private-key>\nexport WALLET_ADDRESS=\u003Cyour-evm-wallet-address>\nexport COMPUTE_AUTH_CHAIN=\"megaeth\"\n\n# Solana\nexport SOLANA_SECRET_KEY=\u003Cyour-solana-secret-key>\nexport SOLANA_WALLET_ADDRESS=\u003Cyour-solana-wallet-address>\nexport COMPUTE_AUTH_CHAIN=\"solana\"\n```\n\n#### Option B: OpenWallet \u002F OWS (optional-first)\n```bash\nnpm install -g @open-wallet-standard\u002Fcore@0.5.0\nexport OWS_WALLET=\"compute-wallet\"\nexport COMPUTE_AUTH_MODE=\"ows\"\n```\n\nCreate `COMPUTE_API_KEY` (optional) for management endpoints:\n```bash\npython {baseDir}\u002Fscripts\u002Fcreate_api_key.py --label \"my-agent\"\n```\n\nOWS is best for compute auth and routine management flows. Direct x402 provision and extend still use local payment-signing paths. MPP provision\u002Fextend should use `mppx` or Tempo Wallet.\n\nResize is a management action, not a second payment flow. The API preserves remaining prepaid dollar credit by recalculating `expires_at` for the target hourly rate after the provider accepts the resize.\n\n---\n\n## ⚠️ Security Notice\n\n> **IMPORTANT**: This skill handles private keys for signing blockchain transactions.\n>\n> - **Never use your primary custody wallet** - Create a dedicated wallet with limited funds\n> - **Private keys are used locally only** - They sign transactions locally and are never transmitted\n> - **For testing**: Use a throwaway wallet with minimal USDC\u002FUSDm\n\n---\n\n## Scripts Overview\n\n| Script | Purpose |\n|--------|---------|\n| `browse_plans.py` | List available GPU\u002FVPS plans with pricing |\n| `browse_regions.py` | List deployment regions |\n| `provision.py` | Provision a new instance (x402 payment, `--months` or `--days`) |\n| `create_api_key.py` | Create an API key for agent access (optional) |\n| `list_instances.py` | List your active instances |\n| `instance_details.py` | Get details for a specific instance |\n| `get_one_time_password.py` | Retrieve one-time root password fallback |\n| `extend_instance.py` | Extend instance lifetime (x402 payment) |\n| `resize_instance.py` | Resize an instance in place (compute auth only) |\n| `destroy_instance.py` | Destroy an instance |\n| `ows_cli.py` | Run OpenWallet \u002F OWS wallet, sign-message, and key commands |\n| `solana_signing.py` | Internal helper for Solana x402 payment signing |\n\n---\n\n## Instance Lifecycle\n\n```\nBrowse Plans → Choose Provider\u002FPlan → Provision (x402\u002FMPP\u002FCredits) → Active → Extend \u002F Destroy → Expired\n```\n\nInstances expire after their prepaid duration. Extend before expiry to keep them running.\n\n---\n\n## Workflows\n\n### A. Browse and Provision\n\n```bash\n# List GPU plans\npython {baseDir}\u002Fscripts\u002Fbrowse_plans.py\n\n# Filter by type (gpu\u002Fvps\u002Fhigh-performance)\npython {baseDir}\u002Fscripts\u002Fbrowse_plans.py --type vcg\n\n# Check available regions\npython {baseDir}\u002Fscripts\u002Fbrowse_regions.py\n\n# Generate a dedicated SSH key once (recommended for agents)\nssh-keygen -t ed25519 -N \"\" -f ~\u002F.ssh\u002Fx402_compute\n\n# Provision an instance for 1 month (triggers x402 payment)\npython {baseDir}\u002Fscripts\u002Fprovision.py vcg-a100-1c-2g-6gb lax --months 1 --label \"my-gpu\" --ssh-key-file ~\u002F.ssh\u002Fx402_compute.pub\n\n# DigitalOcean plans are prefixed with do:\n# They require SSH key access.\npython {baseDir}\u002Fscripts\u002Fprovision.py do:s-1vcpu-1gb nyc3 --days 1 --label \"do-test\" --ssh-key-file ~\u002F.ssh\u002Fx402_compute.pub\n\n# Provision a daily instance (cheaper, use-and-throw)\npython {baseDir}\u002Fscripts\u002Fprovision.py vc2-1c-1gb ewr --days 1 --label \"test-daily\" --ssh-key-file ~\u002F.ssh\u002Fx402_compute.pub\n\n# Provision for 3 days\npython {baseDir}\u002Fscripts\u002Fprovision.py vc2-1c-1gb ewr --days 3 --label \"short-task\" --ssh-key-file ~\u002F.ssh\u002Fx402_compute.pub\n\n# Provision on Solana\npython {baseDir}\u002Fscripts\u002Fprovision.py vc2-1c-1gb ewr --months 1 --label \"my-sol-vps\" --network solana --ssh-key-file ~\u002F.ssh\u002Fx402_compute.pub\n\n# Provision on MegaETH (pays with USDm)\npython {baseDir}\u002Fscripts\u002Fprovision.py vc2-1c-1gb ewr --months 1 --label \"my-mega-vps\" --network megaeth --ssh-key-file ~\u002F.ssh\u002Fx402_compute.pub\n\n# Provision via MPP \u002F mppx (Tempo by default; Stripe\u002Fcard if your mppx config supports it)\nnpx mppx https:\u002F\u002Fcompute.x402layer.cc\u002Fcompute\u002Fprovision \\\n  -X POST \\\n  -J '{\"plan\":\"vc2-1c-1gb\",\"region\":\"ewr\",\"os_id\":2284,\"label\":\"mpp-vps\",\"prepaid_hours\":24,\"ssh_public_key\":\"ssh-ed25519 AAAA... agent\"}'\n\n# If the response includes management_api_key, store it for later instance management:\nexport COMPUTE_API_KEY=\"x402c_...\"\n\n# ⚠️ After provisioning, wait 2-3 minutes for Vultr to complete setup\n# Then fetch your instance details (IP, status):\npython {baseDir}\u002Fscripts\u002Finstance_details.py \u003Cinstance_id>\n```\n\n### B. Manage Instances\n\n```bash\n# Optional: create a reusable API key (avoids message signing each request)\npython {baseDir}\u002Fscripts\u002Fcreate_api_key.py --label \"my-agent\"\n\n# List all your instances\npython {baseDir}\u002Fscripts\u002Flist_instances.py\n\n# Get details for one instance\npython {baseDir}\u002Fscripts\u002Finstance_details.py \u003Cinstance_id>\n\n# Optional fallback if no SSH key was provided during provisioning\npython {baseDir}\u002Fscripts\u002Fget_one_time_password.py \u003Cinstance_id>\n\n# Extend by 1 day\npython {baseDir}\u002Fscripts\u002Fextend_instance.py \u003Cinstance_id> --hours 24\n\n# Extend by 1 month\npython {baseDir}\u002Fscripts\u002Fextend_instance.py \u003Cinstance_id> --hours 720\n\n# Extend on Solana\npython {baseDir}\u002Fscripts\u002Fextend_instance.py \u003Cinstance_id> --hours 720 --network solana\n\n# Extend on MegaETH (pays with USDm)\npython {baseDir}\u002Fscripts\u002Fextend_instance.py \u003Cinstance_id> --hours 720 --network megaeth\n\n# Extend via MPP. MPP extension requires compute auth; use the management API key\n# returned from MPP provisioning or normal wallet signature auth.\nnpx mppx https:\u002F\u002Fcompute.x402layer.cc\u002Fcompute\u002Finstances\u002F\u003Cinstance_id>\u002Fextend \\\n  -X POST \\\n  -H \"X-API-Key: $COMPUTE_API_KEY\" \\\n  -J '{\"extend_hours\":720}'\n\n# Resize via bundled helper script\npython {baseDir}\u002Fscripts\u002Fresize_instance.py \u003Cinstance_id> vc2-2c-4gb\n\n# Resize in place with management auth only (no x402 or MPP payment)\ncurl -X POST https:\u002F\u002Fcompute.x402layer.cc\u002Fcompute\u002Finstances\u002F\u003Cinstance_id>\u002Fresize \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"X-API-Key: $COMPUTE_API_KEY\" \\\n  -d '{\"plan\":\"vc2-2c-4gb\"}'\n\n# DigitalOcean disk growth is irreversible and must be confirmed explicitly\ncurl -X POST https:\u002F\u002Fcompute.x402layer.cc\u002Fcompute\u002Finstances\u002F\u003Cinstance_id>\u002Fresize \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"X-API-Key: $COMPUTE_API_KEY\" \\\n  -d '{\"plan\":\"do:s-2vcpu-4gb\",\"confirm_disk_resize\":true}'\n\n# Destroy\npython {baseDir}\u002Fscripts\u002Fdestroy_instance.py \u003Cinstance_id>\n```\n\n### C. OpenWallet \u002F OWS\n\n```bash\n# List local OWS wallets\npython {baseDir}\u002Fscripts\u002Fows_cli.py wallet-list\n\n# Sign a Base-compatible compute auth message\npython {baseDir}\u002Fscripts\u002Fows_cli.py sign-message --chain eip155:8453 --wallet compute-wallet --message \"hello\"\n\n# Sign a MegaETH-compatible compute auth message\npython {baseDir}\u002Fscripts\u002Fows_cli.py sign-message --chain eip155:4326 --wallet compute-wallet --message \"hello\"\n\n# Sign a Solana-compatible compute auth message\npython {baseDir}\u002Fscripts\u002Fows_cli.py sign-message --chain solana --wallet compute-wallet --message \"hello\"\n\n# Create an OWS agent key\npython {baseDir}\u002Fscripts\u002Fows_cli.py key-create --name codex-compute --wallet compute-wallet\n```\n\n### D. Credits (payment-free provisioning)\n\n```bash\n# Top up credits via x402 payment (one-time)\ncurl -X POST https:\u002F\u002Fcompute.x402layer.cc\u002Fcompute\u002Fcredits\u002Ftopup \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"X-API-Key: $COMPUTE_API_KEY\" \\\n  -d '{\"amount\": 100, \"network\": \"base\"}'\n# Returns 402 → pay → credits added to wallet balance\n\n# Check credit balance\ncurl https:\u002F\u002Fcompute.x402layer.cc\u002Fcompute\u002Fcredits\u002Fbalance \\\n  -H \"X-API-Key: $COMPUTE_API_KEY\"\n\n# Provision using credits (no x402\u002FMPP payment needed)\ncurl -X POST https:\u002F\u002Fcompute.x402layer.cc\u002Fcompute\u002Fprovision \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"X-API-Key: $COMPUTE_API_KEY\" \\\n  -d '{\n    \"plan\": \"vc2-1c-1gb\",\n    \"region\": \"ewr\",\n    \"os_id\": 2284,\n    \"label\": \"credit-vps\",\n    \"prepaid_hours\": 720,\n    \"ssh_public_key\": \"ssh-ed25519 AAAA... agent\",\n    \"use_credits\": true\n  }'\n\n# Extend using credits\ncurl -X POST https:\u002F\u002Fcompute.x402layer.cc\u002Fcompute\u002Finstances\u002F\u003Cinstance_id>\u002Fextend \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"X-API-Key: $COMPUTE_API_KEY\" \\\n  -d '{\"extend_hours\": 720, \"use_credits\": true}'\n```\n\nCredits are scoped per wallet. If the cloud provider rejects the instance after credits are deducted, the full amount is automatically refunded.\n\n---\n\n## x402 Payment Flow\n\n1. Request provision\u002Fextend → server returns `HTTP 402` with payment requirements\n2. Script signs payment locally:\n   - Base: USDC `TransferWithAuthorization` (EIP-712)\n   - MegaETH: USDm ERC-2612 `permit` (EIP-712) — gasless for the user, facilitator settles on-chain\n   - Solana: signed SPL transfer transaction payload\n3. Script resends request with `X-Payment` header containing signed payload\n4. Server verifies payment, settles on-chain, provisions\u002Fextends instance\n\nMegaETH uses an embedded facilitator (no external CDP dependency). The user signs an off-chain ERC-2612 permit, and the facilitator calls `permit()` + `transferFrom()` on MegaETH (~10ms blocks, near-zero gas).\n\nFor Solana, transient facilitator failures can happen. Retry once or twice if you get a temporary 5xx verify error.\n\n## MPP Payment Flow\n\nMPP is available side-by-side with x402 on the same paid endpoints.\n\n1. Request provision\u002Fextend -> server returns `HTTP 402` with `WWW-Authenticate: Payment`\n2. `mppx` or Tempo Wallet creates an MPP credential\n3. Client retries with `Authorization: Payment ...`\n4. Server verifies the MPP payment, provisions\u002Fextends the instance, and returns `Payment-Receipt`\n\nNotes:\n- `POST \u002Fcompute\u002Fprovision` can be paid via MPP without wallet auth. In that case the response includes `management_api_key`; store it because it is shown once and is required for later management.\n- `POST \u002Fcompute\u002Finstances\u002F:id\u002Fextend` via MPP requires compute auth, usually `X-API-Key: $COMPUTE_API_KEY`.\n- `POST \u002Fcompute\u002Finstances\u002F:id\u002Fresize` uses compute auth only. It preserves remaining prepaid value by changing expiry instead of charging again.\n- x402 remains fully supported through the Python scripts and `X-Payment` header flow.\n- MPP methods are service-configured. Tempo is used by default by `mppx`; Stripe\u002Fcard requires a Stripe-capable MPP client\u002Fconfig.\n\n---\n\n## SGL Grid — Inference\n\nDecentralized, confidential inference across attested TEE nodes — **OpenAI-compatible**, so any OpenAI SDK works by pointing `base_url` at the grid. Requests are end-to-end encrypted and can stream token-by-token.\n\n**API base:** `https:\u002F\u002Fgrid.x402compute.cc`\n**Auth:** `X-API-Key: x402c_…` (billed to your prepaid credits — same key\u002Fcredits as Machines) **or** per-request x402 via `X-Payment`.\n**Billing:** pay-per-token in USDC (credits or x402). No subscription.\n\n| Method | Path | Purpose |\n|--------|------|---------|\n| `GET`  | `\u002Fv1\u002Fmodels` | List models currently served by active attested nodes |\n| `POST` | `\u002Fv1\u002Fchat\u002Fcompletions` | OpenAI-compatible chat (set `\"stream\": true` to stream) |\n| `GET`  | `\u002Fgrid\u002Fcapacity` | Live capacity: active nodes, TEE types, served models, `at_capacity` |\n\n```bash\n# 1) Reuse your compute API key (x402c_…) + prepaid credits, or create one:\npython {baseDir}\u002Fscripts\u002Fcreate_api_key.py --label \"my-agent\"   # → x402c_...\n# Top up credits in the dashboard: Settings → Credits (cloud.x402compute.cc).\n\n# 2) Check what's being served + whether the grid has capacity\ncurl https:\u002F\u002Fgrid.x402compute.cc\u002Fv1\u002Fmodels -H \"X-API-Key: $COMPUTE_API_KEY\"\ncurl https:\u002F\u002Fgrid.x402compute.cc\u002Fgrid\u002Fcapacity            # active_nodes, models, at_capacity\n\n# 3) OpenAI-compatible chat (billed to credits)\ncurl -X POST https:\u002F\u002Fgrid.x402compute.cc\u002Fv1\u002Fchat\u002Fcompletions \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"X-API-Key: $COMPUTE_API_KEY\" \\\n  -d '{\"model\":\"llama-3.2-3b\",\"messages\":[{\"role\":\"user\",\"content\":\"Hello\"}]}'\n\n# Streaming: add \"stream\": true and read the SSE token chunks.\n# Pay-per-request with x402 instead of credits: send the X-Payment header\n# (same 402 → sign → resend flow as provision\u002Fextend) and omit X-API-Key.\n```\n\nUse any **OpenAI SDK** by setting `base_url=https:\u002F\u002Fgrid.x402compute.cc\u002Fv1` and `api_key=$COMPUTE_API_KEY`. Before a large batch, check `\u002Fgrid\u002Fcapacity` and back off \u002F retry if `at_capacity` is true.\n\n---\n\n## Provide Compute (run a node)\n\nThe other side of the grid: turn a **TEE-capable machine** into a node that serves confidential,\nOpenAI-compatible inference and **earns USDC + SGL** per settled job. Fully agentic — the installer\nand the `sgl` CLI are shell commands. Full runbook (requirements, flags, maintenance, slashing,\nearnings) → **`references\u002Fnode-operator.md`**.\n\n**Prerequisites:** a supported TEE (e.g. Apple Secure Enclave `apple_se`, Intel TDX\u002FSGX, AMD SEV-SNP,\nAWS Nitro), `llama.cpp` + a GGUF model, and **≥ 50,000 $SGL staked** to your operator (Solana) wallet.\n\n```bash\n# 1. Stake ≥50,000 SGL to your operator wallet (agentic via the x402-layer skill \u002F Staking Engine API,\n#    or at https:\u002F\u002Fstaking.x402layer.cc). Non-custodial; slashable only for proven tampering.\n\n# 2. Install the node CLI + runtime, get a model\ncurl -sSf https:\u002F\u002Fgrid.x402compute.cc\u002Finstall.sh | sh     # installs `sgl` (Singularity-Layer\u002Fsgl-network-node)\nbrew install llama.cpp                                     # local inference runtime (macOS)\n#   download a GGUF, e.g. ~\u002Fmodels\u002FLlama-3.2-3B-Instruct-Q4_K_M.gguf\n\n# 3. Register the node under the staked wallet (headless \u002F agentic)\nsgl init --wallet \u003CSTAKED_WALLET> --tee-type apple_se --models llama-3.2-3b\n#   (interactive alternative: `sgl login`)\n\n# 4. Attest the enclave (required before jobs; re-run after any binary update)\nsgl attest\n\n# 5. Serve as a background service (production)\nsgl service install \\\n  --model-path ~\u002Fmodels\u002FLlama-3.2-3B-Instruct-Q4_K_M.gguf \\\n  --model-name llama-3.2-3b \\\n  --resource-percent 50\n\n# verify\nsgl status\ncurl https:\u002F\u002Fgrid.x402compute.cc\u002Fgrid\u002Fcapacity            # your node raises active_nodes \u002F models\n```\n\n**Maintenance:** `sgl off-grid` (stop new jobs cleanly for planned downtime — no penalty) \u002F `sgl on-grid`\n(resume). Honest downtime is never slashed; only proven tampering is. Re-run `sgl attest` after binary\nupdates. Docs: `https:\u002F\u002Fdocs.x402layer.cc\u002Fcloud\u002Fprovide\u002Fnode-setup`.\n\n---\n\n## Plan Types\n\n| Type | Plan Prefix | Description |\n|------|-------------|-------------|\n| GPU | `vcg-*` | GPU-accelerated (A100, H100, etc.) |\n| VPS | `vc2-*` | Standard cloud compute |\n| High-Perf | `vhp-*` | High-performance dedicated |\n| Dedicated | `vdc-*` | Dedicated bare-metal |\n| DigitalOcean | `do:*` | DigitalOcean Droplets (provider-prefixed size slugs) |\n\n---\n\n## Environment Reference\n\n| Variable | Required For | Description |\n|----------|--------------|-------------|\n| `PRIVATE_KEY` | Base\u002FMegaETH payment signing | EVM private key (0x...) |\n| `WALLET_ADDRESS` | Base\u002FMegaETH direct-signing mode | EVM wallet address (0x...) |\n| `SOLANA_SECRET_KEY` | Solana direct-signing mode | Solana signer key (base58 or JSON byte array) |\n| `SOLANA_WALLET_ADDRESS` | Solana direct-signing mode | Solana wallet address (optional if derivable from secret) |\n| `COMPUTE_AUTH_CHAIN` | Chain auth override | `base`, `megaeth`, or `solana` |\n| `COMPUTE_API_KEY` | Optional | Reusable API key for compute management endpoints |\n| `COMPUTE_AUTH_MODE` | Optional | `auto`, `private-key`, or `ows` |\n| `OWS_WALLET` | OWS auth mode | OWS wallet name or ID |\n| `OWS_BIN` | OWS auth mode | Optional explicit path to the `ows` executable |\n| `COMPUTE_API_KEY` | MPP\u002Fno-wallet management | API key returned once after an MPP provision without wallet auth |\n\n---\n\n## API Reference\n\nFor full endpoint details, see:\n- [references\u002Fapi-reference.md](references\u002Fapi-reference.md)\n- [references\u002Fopenwallet-ows.md](references\u002Fopenwallet-ows.md)\n\n---\n\n## Resources\n\n- 📖 **Documentation:** [docs.x402layer.cc\u002Fagentic-access\u002Fx402-compute](https:\u002F\u002Fdocs.x402layer.cc\u002Fagentic-access\u002Fx402-compute)\n- 🖥️ **Cloud Network app:** [cloud.x402compute.cc](https:\u002F\u002Fcloud.x402compute.cc) (Machines, Grid, API keys, credits)\n- 🌐 **Singularity Compute:** [x402compute.cc](https:\u002F\u002Fx402compute.cc)\n- 🔑 **Staking:** [staking.x402layer.cc](https:\u002F\u002Fstaking.x402layer.cc) — stake $SGL (min 50,000) to run a node \u002F validate; rewards in USDC + SGL\n- **API bases:** Machines `https:\u002F\u002Fcompute.x402layer.cc` · Grid `https:\u002F\u002Fgrid.x402compute.cc`\n\n---\n\n## OWS scope note\n\nOWS support is optional-first in this release:\n- use it for compute auth and management\u002FAPI-key flows\n- keep direct Base, MegaETH, or Solana signing keys for the paid provision and extend flows\n- resize, list, details, password fallback, and destroy work with normal compute auth \u002F API keys\n",{"name":5,"version":24,"homepage":25,"metadata":26,"description":59,"allowed-tools":60},"1.6.0","https:\u002F\u002Fdocs.x402layer.cc\u002Fagentic-access\u002Fx402-compute",{"clawdbot":27},{"os":28,"emoji":31,"homepage":32,"requires":33},[29,30],"linux","darwin","🖥️","https:\u002F\u002Fcloud.x402compute.cc",{"env":34,"bins":57},[35,39,42,45,48,51,54],{"name":36,"optional":37,"sensitive":37,"description":38},"PRIVATE_KEY",true,"EVM private key for Base\u002FMegaETH payment signing (use a dedicated low-balance wallet)",{"name":40,"optional":37,"description":41},"WALLET_ADDRESS","EVM wallet address corresponding to PRIVATE_KEY",{"name":43,"optional":37,"sensitive":37,"description":44},"SOLANA_SECRET_KEY","Solana signer key for Solana payment signing (use a dedicated low-balance wallet)",{"name":46,"optional":37,"description":47},"SOLANA_WALLET_ADDRESS","Solana wallet address",{"name":49,"optional":37,"sensitive":37,"description":50},"COMPUTE_API_KEY","Reusable API key for management endpoints (created via POST \u002Fcompute\u002Fapi-keys)",{"name":52,"optional":37,"description":53},"COMPUTE_AUTH_CHAIN","Auth chain override — base, megaeth, or solana",{"name":55,"optional":37,"description":56},"OWS_BIN","Explicit path to a locally installed OWS binary (avoids runtime npx downloads)",[58],"python3","This skill should be used when the user asks to \"provision GPU instance\",\n\"spin up a cloud server\", \"list compute plans\", \"browse GPU pricing\",\n\"extend compute instance\", \"resize compute instance\", \"destroy server instance\", \"check instance status\",\n\"list my instances\", \"top up compute credits\", \"check credit balance\",\n\"run inference on the grid\", \"decentralized inference\", \"OpenAI-compatible API\",\n\"confidential \u002F TEE inference\", \"list grid models\", \"check grid capacity\",\n\"run a node\", \"provide compute\", \"become a grid node\", \"node operator\", \"join the grid\",\n\"stake to run a node\", \"serve a model on the grid\", \"earn from compute\",\nor manage Singularity Cloud Network compute. Three jobs: SGL Machines\n(GPU\u002FVPS provisioning across Vultr & DigitalOcean), SGL Grid (decentralized,\nconfidential, OpenAI-compatible inference — consume it), and Provide Compute\n(run a TEE node on the grid to serve inference and earn USDC + SGL). Pay with\nUSDC on Base or Solana, USDm on MegaETH via x402, optional MPP\u002FMppx, or\npre-loaded USD credits. Includes optional OWS-backed auth and management flows.\n",[61,62,63,64,65],"Read","Write","Edit","Bash","WebFetch","master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fclawhub\u002Fx\u002Fx402-compute",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":76,"prompt":86,"zipAvailable":37},[77,80,83],{"tool":78,"command":79},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill x402-compute",{"tool":81,"command":82},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill x402-compute",{"tool":84,"command":85},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill x402-compute","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fx\u002Fx402-compute\u002FSKILL.md",[],[89,96,103,110,117,124],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":19},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":19},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":19},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]