x402Compute

GPU compute marketplace powered by x402 payments. Provision cloud GPU instances, pay with USDC on Base or Solana, and manage your infrastructure programmatically.

🖥️ Compute API is available at compute.x402layer.cc

Overview

x402Compute lets you provision GPU-powered virtual machines using the same x402 payment flow used across Singularity Layer. Instances are provisioned via Vultr infrastructure and can be managed entirely through the API or the Compute Dashboard.

💳 Pay-Per-Provision

Pay with USDC on Base or Solana. No subscriptions required.

⏳ Extend Anytime

Extend your instance's lifetime from 1 week to 6 months.

🔌 Full API Access

SSH access, root control, and full API for programmatic management.

Instance Lifecycle

1. Browse Plans2. Provision (x402 Pay)3. Active4. Extend / Destroy5. Expired

API Reference

Base URL: https://compute.x402layer.cc

Auth: Management endpoints require either signed auth headers (X-Auth-*) or anX-API-Key issued viaPOST /compute/api-keys. Use the x402-compute skill or SDK for automatic signing.

MethodEndpointDescriptionAuth
GET/compute/plansList available GPU plans with pricingNone
GET/compute/regionsList available deployment regionsNone
GET/compute/osList available OS imagesNone
POST/compute/provisionProvision a new instancex402 💰 + Auth
POST/compute/api-keysCreate API key for agentsSignature only
GET/compute/api-keysList API keysSignature or X-API-Key
DELETE/compute/api-keys/:idRevoke API keySignature only
GET/compute/instancesList your instancesSignature or X-API-Key
GET/compute/instances/:idGet instance detailsSignature or X-API-Key
DELETE/compute/instances/:idDestroy an instanceSignature or X-API-Key
POST/compute/instances/:id/passwordRetrieve one-time root password fallbackSignature or X-API-Key
POST/compute/instances/:id/extendExtend instance lifetimex402 💰 + Auth

Quick Start

1. Browse Available Plans

curl https://compute.x402layer.cc/compute/plans

# Response includes GPU plans with pricing:
# {
#   "plans": [
#     {
#       "id": "vcg-a100-1c-2g-6gb",
#       "name": "A100 1 GPU",
#       "vcpu_count": 12,
#       "ram": 120832,
#       "gpu_vram_gb": 80,
#       "monthly_cost": 90,
#       ...
#     }
#   ]
# }

2. Provision an Instance

The provision endpoint returns a 402 response with payment requirements. Use the x402-compute skill or an x402-aware client to handle signing and payment automatically.

# Step 1: Request provision — get 402 challenge
curl -X POST https://compute.x402layer.cc/compute/provision \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key" \
  -d '{
    "plan": "vcg-a100-1c-2g-6gb",
    "region": "lax",
    "os_id": 2284,
    "label": "my-gpu-instance",
    "prepaid_hours": 720,
    "ssh_public_key": "ssh-ed25519 AAAA... user@host",
    "network": "base"
  }'

# Step 2: Pay via x402 (handled automatically by x402 clients)
# Step 3: Instance is provisioned. SSH access uses your public key (no password returned).

2b. One-Time Password Fallback (Optional)

# Use only if you did not provide ssh_public_key
curl -X POST https://compute.x402layer.cc/compute/instances/YOUR_ID/password \
  -H "X-API-Key: your_api_key"

# Returns root username + password once.
# Subsequent requests return 409.

3. List Your Instances

curl https://compute.x402layer.cc/compute/instances \
  -H "X-API-Key: your_api_key"

# Returns all instances with status, IP, expiry, etc.

4. Extend an Instance

# Extend by 720 hours (1 month)
curl -X POST https://compute.x402layer.cc/compute/instances/YOUR_ID/extend \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key" \
  -d '{
    "extend_hours": 720,
    "network": "base"
  }'

# Returns 402 challenge → pay → instance extended

5. Destroy an Instance

curl -X DELETE https://compute.x402layer.cc/compute/instances/YOUR_ID \
  -H "X-API-Key: your_api_key"

# Instance is destroyed immediately

Payment Flow

x402Compute uses the standard x402 payment protocol for provisioning and extending instances:

1. Request → 402 Challenge

Send a provision/extend request. The server responds with HTTP 402 containing payment requirements (amount, USDC address, chain).

2. Client Pays

An x402-aware client (SDK, browser wallet, or agent) automatically constructs and signs the USDC transfer, then resends the request with an X-Payment header.

3. Verify → Settle → Provision

The server verifies the payment via the x402 facilitator, settles the transaction on-chain, and then provisions (or extends) the instance.

Supported Networks

Base (EVM)

USDC on Base • 100% reliable • Recommended

Solana

USDC on Solana • ~75% success rate • Retry recommended

Resources