name: monetize-guide description: "End-to-end guide for monetizing GPU resources or HTTP services through obol-stack. Covers pre-flight checks, model detection, pricing research, selling via x402, ERC-8004 registration, and verification. Use this skill when the user wants to monetize their machine." metadata: { "openclaw": { "emoji": "๐", "requires": { "bins": ["python3"] } } }
Monetize Guide
Step-by-step guide to expose local GPU resources or HTTP services as x402 payment-gated endpoints with on-chain discovery via ERC-8004.
When to Use
- User says "monetize my machine", "sell my GPU", or "expose my service for payments"
- Setting up a new paid endpoint from scratch
- Need to figure out what to sell and at what price
When NOT to Use
- Managing existing offers (list/status/delete) โ use
selldirectly - Buying inference from others โ use
buy-x402 - Cluster diagnostics โ use
obol-stack
Workflow
Follow these phases in order. Stop and ask the user for confirmation before executing phase 4.
Phase 1: Pre-flight Checks
Verify the environment is ready before proceeding.
# 1. Check cluster is running
obol kubectl get nodes
# 2. Check the agent is initialized (has RBAC for monetization)
obol kubectl get clusterrolebinding openclaw-monetize-read-binding -o jsonpath='{.subjects}'
# 3. Get the wallet address (auto-generated by agent)
python3 ${OBOL_SKILLS_DIR:-/data/.openclaw/skills}/ethereum-local-wallet/scripts/signer.py accounts
If cluster is not running: Tell the user to run obol stack up first. Do NOT run it yourself โ it takes several minutes and changes system state.
If agent has no RBAC subjects: Tell the user to run obol agent init.
If no wallet address: The wallet is created during obol stack up. If missing, the stack may not have completed setup.
Phase 2: Detect What Can Be Sold
For GPU / Inference
# Check what Ollama models are available locally
curl -s http://localhost:11434/api/tags | python3 -c "
import json, sys
data = json.load(sys.stdin)
for m in data.get('models', []):
size_gb = m.get('size', 0) / 1e9
print(f\" {m['name']:30s} {size_gb:.1f} GB\")
"
Report the available models to the user. If no models are found, suggest they pull one:
ollama pull qwen3.5:4b # Smallest current Qwen, ~3.4 GB (low-RAM laptops)
ollama pull qwen3.5:9b # Validated baseline, ~6.6 GB
ollama pull qwen3.6:27b # High quality, ~17 GB (needs โฅ32GB RAM)
For External LAN Resources (GPU servers, vLLM, etc.)
Ask the user if they have a GPU server or inference endpoint on their local network. If yes, get:
- The endpoint URL (e.g.,
http://192.168.0.202:8000/v1) - The model name served at that endpoint
Verify it's reachable and OpenAI-compatible:
# Probe the external endpoint
curl -s <ENDPOINT_URL>/models | python3 -c "
import json, sys
data = json.load(sys.stdin)
for m in data.get('data', []):
print(f\" {m['id']}\")
"
If reachable, this endpoint can be sold by bridging it through LiteLLM (see Phase 4).
For HTTP Services (in-cluster)
# List services in the cluster that could be monetized
obol kubectl get svc -A --no-headers | grep -v 'kube-system\|traefik\|x402\|monitoring\|erpc\|obol-frontend'
Ask the user which service they want to expose and on which port.
Phase 3: Research Pricing
Query the ERC-8004 registry to see what comparable services charge.
# Search for registered agents on Base Sepolia
python3 ${OBOL_SKILLS_DIR:-/data/.openclaw/skills}/discovery/scripts/discovery.py search --limit 10
# For each agent with x402Support, fetch their registration to see pricing
python3 ${OBOL_SKILLS_DIR:-/data/.openclaw/skills}/discovery/scripts/discovery.py uri <agent_id>
Pricing guidelines (present these to the user with your research):
| Service Type | Typical Range | Notes |
|---|---|---|
| LLM inference (small, <4B) | 0.0005โ0.002 USDC/req | Fast, low compute |
| LLM inference (medium, 4-14B) | 0.001โ0.005 USDC/req | Good quality/cost balance |
| LLM inference (large, >14B) | 0.005โ0.02 USDC/req | High quality, slower |
| Data API / indexer | 0.0001โ0.001 USDC/req | Depends on query complexity |
| Compute-heavy (GPU hours) | 0.10โ1.00 USDC/hour | Fine-tuning, training |
Always present your research and recommendation to the user and ask them to confirm the price before proceeding.
Phase 4: Sell the Service
Only proceed after the user has confirmed the price.
Inference (Ollama model)
obol sell inference <name> \
--model <model_name> \
--price <confirmed_price> \
--register-name "<descriptive name>" \
--register-description "<what the model does>" \
--register-skills natural_language_processing/natural_language_generation/text_completion \
--register-domains technology/data_science
The --wallet and --chain will be auto-resolved (remote-signer wallet, base-sepolia default).
External LAN Resource (GPU server, vLLM, etc.)
Two steps: first bridge the endpoint into LiteLLM, then sell LiteLLM.
# Step A: Add the external endpoint to LiteLLM
obol model setup custom \
--endpoint <full_url_with_v1> \
--model "<model_name_at_endpoint>"
# Step B: Sell it through LiteLLM
obol sell http <name> \
--upstream litellm \
--port 4000 \
--namespace llm \
--per-request <confirmed_price> \
--wallet <wallet_address> \
--chain base-sepolia \
--health-path /health/liveliness \
--register-name "<descriptive name>" \
--register-description "<what the service does>" \
--register-skills natural_language_processing/natural_language_generation/text_completion \
--register-domains technology/data_science
The --endpoint must include /v1 if the upstream is an OpenAI-compatible server (vLLM, TGI, etc.) โ LiteLLM does not append it automatically.
LAN IPs (e.g., http://192.168.0.202:8000/v1) are reachable from inside the k3d cluster without any additional network configuration.
HTTP Service (in-cluster)
obol sell http <name> \
--upstream <service_name> \
--namespace <namespace> \
--port <port> \
--per-request <confirmed_price> \
--chain base-sepolia \
--health-path <health_endpoint> \
--register-name "<descriptive name>" \
--register-description "<what the service does>" \
--register-skills <oasf_skill_path> \
--register-domains <oasf_domain_path>
Phase 5: Wait for Reconciliation
obol sell http now registers by default. Use --no-register only for local
or private-only flows where on-chain discovery is intentionally skipped.
The agent reconciler automatically processes the ServiceOffer through 6 stages.
# Watch the conditions progress (check every 15 seconds, up to 2 minutes)
for i in $(seq 1 8); do
echo "--- Attempt $i ---"
obol sell status <name> -n <namespace> 2>&1 | grep -A1 'type:\|status:\|reason:\|message:'
sleep 15
done
Expected progression:
- ModelReady โ True (instant for HTTP, may take minutes if pulling a model)
- UpstreamHealthy โ True
- PaymentGateReady โ True
- RoutePublished โ True
- Registered โ True (best-effort, non-blocking)
- Ready โ True
If a stage is stuck, check:
# Agent logs for reconciliation errors
obol kubectl logs -l app.kubernetes.io/name=hermes -n hermes-obol-agent --tail=50
# x402-verifier is running
obol kubectl get pods -n x402
Phase 6: Verify the Endpoint
# Get the tunnel URL
obol tunnel status
# Test the endpoint is live and payment-gated (should return 402 with pricing)
obol sell test <name> -n <namespace>
# Or manually:
TUNNEL_URL=$(obol tunnel status 2>&1 | grep -o 'https://[^ ]*')
curl -s -o /dev/null -w "%{http_code}" "$TUNNEL_URL/services/<name>/health"
# Expected: 402
# Inspect the 402 pricing response
curl -s "$TUNNEL_URL/services/<name>/health" | python3 -m json.tool
A 402 response with x402Version: 1 and an accepts array confirms the endpoint is live and payment-gated.
Phase 7: Report to User
Present a summary:
Service monetized successfully!
Name: <name>
Model: <model> (if inference)
Price: <price> USDC per request
Chain: base-sepolia
Wallet: <wallet_address>
Endpoint: <tunnel_url>/services/<name>/v1/chat/completions
Registry: Agent #<id> on ERC-8004 (Base Sepolia)
Buyers can discover this service at:
<tunnel_url>/.well-known/agent-registration.json
To check status: obol sell status <name> -n <namespace>
To stop selling: obol sell stop <name> -n <namespace>
To delete: obol sell delete <name> -n <namespace>
OASF Skills & Domains Reference
Use these when registering for on-chain discovery:
Common skills:
natural_language_processing/natural_language_generation/text_completionโ LLM chatnatural_language_processing/text_generationโ general text generationdata_management/indexingโ data indexing servicesdata_management/searchโ search servicesdevops_mlops/model_versioningโ training/fine-tuning
Common domains:
technology/data_scienceโ AI servicesresearch_and_development/scientific_researchโ ML researchtechnology/blockchainโ blockchain data services
Constraints
- Always confirm pricing with the user โ never set a price autonomously
- Do NOT run
obol stack upwithout explicit user request โ it's a long-running infra change - Do NOT run
obol stack downorobol stack purgeโ destructive operations - Registration is best-effort โ services become Ready even if on-chain mint fails (wallet may lack gas funds)
- Tunnel URL changes on restart โ registration docs auto-update on next reconcile