Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.x402layer.cc/llms.txt

Use this file to discover all available pages before exploring further.

x402 Compute Skill

The x402-compute skill lets agents and developers provision and manage VPS/GPU instances on Vultr or DigitalOcean using x402 payments on Base, Solana, or MegaETH, or MPP payments through Tempo-compatible clients such as mppx. Optional OWS-backed auth and API keys are available for management flows, including in-place resize.
Primary access method is SSH public key. If no SSH key was provided during provisioning, a one-time password fallback endpoint is available.
Current release: v1.3.1. x402 Base/Solana/MegaETH payments are live. MegaETH uses USDm (ERC-2612 permit) with an embedded facilitator — gasless for users. MPP Tempo USDC.e payments are also live for agent/CLI provisioning. Stripe card payments are code-ready pending Stripe Machine Payments / Shared Payment Token access.
DigitalOcean is available as an additional compute provider when configured. DigitalOcean plans are prefixed with do: and require SSH key access because DigitalOcean does not expose one-time root passwords through its API.

Base URL

https://compute.x402layer.cc

Auth Model

Management endpoints require one of:
  1. Signature auth headers (X-Auth-*)
  2. API key (X-API-Key)
Supported auth approaches today:
  • direct Base, Solana, or MegaETH signing keys
  • optional OpenWallet / OWS for auth + API-key creation + management
Recommended agent flow:
  1. Create API key once via POST /compute/api-keys using direct signing keys or OWS-backed auth.
  2. Store key in COMPUTE_API_KEY.
  3. Use API key for routine list/details/resize/destroy/password fallback calls.

Resize model

  • POST /compute/instances/:id/resize is a management action, not a second payment flow.
  • The API preserves the instance’s remaining prepaid dollar credit and recalculates expires_at for the target hourly rate.
  • Resize stays on the current provider and current region. The backend validates family/spec compatibility before it forwards the provider API call.
  • Vultr resizes are upgrade-only.
  • DigitalOcean can increase disk size, but disk-growing resizes require confirm_disk_resize: true because the disk change is irreversible.
  • Expect downtime during resize. Take a snapshot/backup first.

Endpoint Summary

MethodEndpointPurpose
GET/compute/plansList VPS/GPU plans
GET/compute/regionsList deployment regions
GET/compute/osList OS images
POST/compute/provisionProvision Vultr or DigitalOcean instance (x402 or MPP payment)
GET/compute/instancesList instances for authenticated wallet
GET/compute/instances/:idGet instance details
POST/compute/instances/:id/passwordOne-time root password fallback
POST/compute/instances/:id/extendExtend prepaid duration (x402 or MPP payment + auth)
POST/compute/instances/:id/resizeResize an instance in place and recalculate remaining prepaid time
DELETE/compute/instances/:idDestroy instance
POST/compute/api-keysCreate API key (signature only)
GET/compute/api-keysList API keys
DELETE/compute/api-keys/:idRevoke API key

Install Skill

ClawHub / OpenClaw

npx clawhub@latest install x402-compute
pnpm dlx clawhub@latest install x402-compute
bunx clawhub@latest install x402-compute
ClawHub listing:
  • https://clawhub.ai/ivaavimusic/x402-compute

Self-hosted installer

curl -fsSL https://api.x402layer.cc/skill/x402-compute/install | bash
This install path is served by the compute skill handler in the compute backend.

Scripts Included

ScriptPurpose
browse_plans.pyBrowse plans and pricing
browse_regions.pyBrowse regions
provision.pyProvision a compute instance
create_api_key.pyCreate reusable API key
list_instances.pyList instances
instance_details.pyGet detailed status
get_one_time_password.pyFetch one-time root password fallback
extend_instance.pyExtend instance duration
resize_instance.pyResize an instance in place
destroy_instance.pyDestroy instance
ows_cli.pyRun OpenWallet / OWS wallet, sign-message, and key commands

Quick Workflow

python scripts/provision.py vcg-a100-1c-2g-6gb lax --months 1 --ssh-key-file ~/.ssh/id_ed25519.pub

1b) Provision with MPP / mppx

npx mppx https://compute.x402layer.cc/compute/provision \
  -X POST \
  -J '{"plan":"vc2-1c-1gb","region":"ewr","os_id":2284,"label":"mpp-vps","prepaid_hours":24,"ssh_public_key":"ssh-ed25519 AAAA... agent"}'
If the MPP provision does not include wallet/API-key auth, the response includes a one-time management_api_key. Store it and use it for later instance management. DigitalOcean example:
npx mppx https://compute.x402layer.cc/compute/provision \
  -X POST \
  -J '{"plan":"do:s-1vcpu-1gb","provider":"digitalocean","region":"nyc3","os_id":123456789,"label":"do-vps","prepaid_hours":24,"ssh_public_key":"ssh-ed25519 AAAA... agent"}'

2) Create API Key for Agents

python scripts/create_api_key.py --label "my-agent"
export COMPUTE_API_KEY="x402c_..."

2b) Optional OpenWallet / OWS auth path

npm install -g @open-wallet-standard/core
export OWS_WALLET="compute-wallet"
export COMPUTE_AUTH_MODE="ows"
python scripts/create_api_key.py --label "my-agent"

3) Manage Instances

python scripts/list_instances.py
python scripts/instance_details.py <instance_id>
python scripts/resize_instance.py <instance_id> vc2-2c-4gb
python scripts/extend_instance.py <instance_id> --hours 720
python scripts/destroy_instance.py <instance_id>
MPP-paid extension requires compute auth:
npx mppx https://compute.x402layer.cc/compute/instances/<instance_id>/extend \
  -X POST \
  -H "X-API-Key: $COMPUTE_API_KEY" \
  -J '{"extend_hours":720}'
Resize uses the same management auth, but does not require x402 or MPP payment:
curl -X POST https://compute.x402layer.cc/compute/instances/<instance_id>/resize \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $COMPUTE_API_KEY" \
  -d '{"plan":"vc2-2c-4gb"}'
DigitalOcean disk growth example:
curl -X POST https://compute.x402layer.cc/compute/instances/<instance_id>/resize \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $COMPUTE_API_KEY" \
  -d '{"plan":"do:s-2vcpu-4gb","confirm_disk_resize":true}'

4) One-Time Password Fallback (Only if no SSH key)

python scripts/get_one_time_password.py <instance_id>
This works once per instance. Repeated calls return 409.

OWS scope note

  • OWS is great for compute auth and management/API-key flows
  • Direct x402 provision and extend still use the current Base, Solana, or MegaETH payment-signing paths
  • MPP provision and extend use mppx, Tempo Wallet, or another MPP-capable client

Payment options

OptionStatusNotes
x402 Base USDCLiveExisting UI/script flow
x402 Solana USDCLiveExisting script flow
x402 MegaETH USDmLiveERC-2612 permit flow; embedded facilitator; gasless for users
MPP Tempo USDC.eLiveTested with npx mppx; returns Payment-Receipt
MPP Stripe cardsPendingRequires Stripe Machine Payments / Shared Payment Token access

Compute providers

ProviderStatusNotes
VultrLiveOne-time password fallback available; resize is upgrade-only
DigitalOceanCode-readyRequires DIGITALOCEAN_API_TOKEN; SSH key required; disk growth is irreversible

Security Notes

  • Wallet/agent can only access its own instances.
  • Replay protection uses signed nonce + timestamp.
  • MPP replay protection uses a shared Cloudflare Durable Object replay store.
  • Payment wallet must match authenticated wallet.
  • Resize preserves remaining prepaid value by changing expiry instead of charging a second payment.
  • Passwords are not returned in standard list/details/provision responses.
  • One-time password endpoint is owner-authenticated and single-use.

References

  • Skill definition: skills/x402-compute/SKILL.md
  • Skill API reference: skills/x402-compute/references/api-reference.md
  • OWS reference: skills/x402-compute/references/openwallet-ows.md
  • Hosted installer: https://api.x402layer.cc/skill/x402-compute/install