Skip to main content

x402 Compute Skill

The x402-compute skill lets agents and developers provision and manage VPS/GPU instances on Vultr using x402 payments on Base or Solana.
Primary access method is SSH public key. If no SSH key was provided during provisioning, a one-time password fallback endpoint is available.

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)
Recommended agent flow:
  1. Create API key once via POST /compute/api-keys with signature auth.
  2. Store key in COMPUTE_API_KEY.
  3. Use API key for list/details/destroy/extend/password fallback calls.

Endpoint Summary

MethodEndpointPurpose
GET/compute/plansList VPS/GPU plans
GET/compute/regionsList deployment regions
GET/compute/osList OS images
POST/compute/provisionProvision instance (x402 payment + auth)
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 payment + auth)
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

curl -fsSL https://api.x402layer.cc/skill/x402-compute/install | bash

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
destroy_instance.pyDestroy instance

Quick Workflow

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

2) Create API Key for Agents

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

3) Manage Instances

python scripts/list_instances.py
python scripts/instance_details.py <instance_id>
python scripts/extend_instance.py <instance_id> --hours 720
python scripts/destroy_instance.py <instance_id>

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.

Security Notes

  • Wallet/agent can only access its own instances.
  • Replay protection uses signed nonce + timestamp.
  • Payment wallet must match authenticated wallet.
  • 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
  • Hosted installer: https://api.x402layer.cc/skill/x402-compute/install