← Back to run402.com  ·  New: Agent Allowance  ·  Apps & Fork  ·  Your account ↗
Postgres + Sites · x402 + MPP payments

Everything your AI agent needs to build & ship a webapp

Run402 gives tool-using agents instant infrastructure: Postgres, a REST API, auth, file storage, row-level security, serverless functions, and full-stack hosting — static sites, Astro SSR, and same-origin API routes, shipped in one atomic deploy. Paid and provisioned autonomously via x402 (USDC on Base) or MPP (pathUSD on Tempo). No signups.

1,303 wallets served

Do this: paste this into your agent's chat.

Please build me a demo app using run402.com/llms-cli.txt (curl it)

Pick a prompt, ship a webapp

Your agent will read the docs, provision the backend, and deploy a frontend — completely free on the prototype tier (testnet money only). Pick an idea and copy the prompt.

What your agent gets (full stack)

Run402 is the missing bridge between "the agent wrote code" and "your app is live on the internet".

Database
Postgres 16
Aurora Serverless v2 · schema-per-project isolation
API
Instant REST
PostgREST · Supabase-shaped /rest/v1
Auth
Users + JWT
Email/password flows · integrates with RLS policies
Storage
Content-addressed CDN
Paste-and-go URLs · SHA-256 integrity (SRI) baked in
Security
Row-level security
Multi-tenant patterns · least-privilege by default
Frontend
Sites + Astro SSR
Static or server-rendered · ISR edge cache · *.run402.com + custom domains
Functions
Node 22 serverless
Cron schedules · in-handler db / auth / email / AI helpers
Routing
Same-origin routes
Map /admin & /api/* to functions · clean static URLs
Deploys
One atomic apply
DB + site + functions + secrets in one commit · push-to-deploy via GitHub OIDC
Agent DX
Machine-readable errors
Stable code · retryable / next_actions — branch on JSON, not English

Pricing (prepaid, hard-capped)

The prototype tier is free — uses testnet USDC to verify the agent's wallet and x402 setup. No real money. Production tiers are prepaid leases (no overages, no surprise bills).

Prototype
Free
7 days · 250 MB · 500K calls · 1 MB max function
Testnet USDC · $0 real money
Hobby
$5
30 days · 1 GB · 5M calls · 5 MB max function
Team
$20
30 days · 10 GB · 50M calls · 25 MB max function

Prototype tier uses testnet money — just to verify the agent's setup works. For production (hobby/team), your agent pays with real USDC on Base via x402 or pathUSD on Tempo via MPP, or you can buy Run402 credits with a credit card via Stripe.

Need on-chain signing? KMS signers: $0.04/day per wallet ($1.20/month) plus $0.000005 per contract call (KMS sign fee). Chain gas at-cost. Non-custodial — see /billing/.

How it works (one apply call, full app)

apply — database, site, assets, subdomain — one atomic commit
# 1. Provision a project (one x402 payment, covers everything below).
POST https://api.run402.com/projects/v1
# => project_id, anon_key, service_key

# 2. Apply the entire app in one atomic commit:
#    migrations + RLS + functions + site files + assets + subdomain.
POST https://api.run402.com/apply/v1/plans
{
  "project": "prj_...",
  "database":  { "migrations": [{ "id": "001_init", "sql": "CREATE TABLE todos (...);" }] },
  "site":      { "replace": { "index.html": {...} } },
  "assets":    { "put": { "logo.svg": {...} } },
  "subdomains": { "set": ["your-subdomain"] }
}
POST https://api.run402.com/apply/v1/plans/:id/commit
# => https://<your-subdomain>.run402.com (live!)

Database + tables + auth + site + functions + assets + subdomain — one atomic commit, everything live at the same instant. Or use the SDK: await r.project(id).apply(spec) runs plan and commit for you. See /llms.txt or the Run402 2.0 announcement for details.

Works with OpenClaw, MCP, or plain HTTP

Run402 is agent-native: your agent can integrate however it prefers. The canonical docs are /llms.txt.

HTTP    Call the API directly: https://api.run402.com
MCP     npx run402-mcp
OpenClaw Run402 skill includes apply + assets + provisioning tools

What is x402?

In 1997, HTTP reserved status code 402 Payment Required—but digital payments weren't ready. Nearly three decades later, stablecoins on L2 chains and agents that can sign transactions finally make it real.

x402 is an open protocol by Coinbase that turns any HTTP API into a paid service. No accounts, no subscriptions—just standard HTTP headers and USDC on Base.

# How x402 works:
1. Agent sends HTTP request      → Server returns 402 Payment Required
2. Agent signs USDC transfer      → Retries with payment proof
3. Server verifies and settles    → Returns 200 OK + resource

# Settlement: ~2 seconds. Gas: sub-cent on Base L2.
# The agent never pays gas — the facilitator submits the tx.

What is MPP?

MPP (Machine Payments Protocol) uses the same 402→sign→retry pattern as x402—but runs on Tempo, an EVM-compatible L1 with sub-second finality. No gas token: fees are paid in stablecoins (pathUSD). The same private key works on both chains.

MPP is an open protocol by Stripe. Agents use the mppx SDK the same way they use x402—one config field switches the payment rail.

# How MPP works:
1. Agent sends HTTP request      → Server returns 402 Payment Required
2. Agent signs pathUSD transfer  → Retries with payment proof
3. Server verifies and settles    → Returns 200 OK + resource

# Settlement: sub-second on Tempo L1.
# No gas token — fees paid in stablecoins (pathUSD).

Why this matters (for humans)

Today, agents can write the frontend in minutes—then they stop at the wall: "Create a database. Set up auth. Configure storage. Deploy hosting. Paste me the keys."

Run402 removes the wall. With x402 or MPP, the agent can procure infrastructure the moment it needs it—under a prepaid cap—and hand you a live URL.

# Without autonomous infrastructure:
Agent   "I can build this, but I need a DB + auth + hosting. Can you set it up?"
Human   Signs up → configures → copies keys → pastes back
Time    10–30 minutes of overhead, per project

# With Run402:
Agent   Pays + provisions over HTTP (x402 or MPP)
Result  Backend + frontend hosting, ready
Time    seconds, minimal human involvement

Durability & ops

Database     AWS Aurora Serverless v2 (Postgres 16), multi-AZ
Sites        CloudFront + S3 + Lambda SSR (wildcard *.run402.com + custom domains)
Encryption  At rest (Aurora + S3) and in transit (TLS)
Backups     Automated, 7-day retention
Isolation   Each project gets its own Postgres schema
Status      status.run402.com

Project lifecycle

Leases are prepaid with hard caps. No overage charges, no surprise bills. The live site keeps serving end users throughout the ~104-day soft-delete grace — only the owner's control plane gets gated.

# After lease expires (site still serves end users throughout):
Day 0     past_due  — first warning email
Day 14    frozen    — deploys/secrets return 402; subdomain reserved
Day 44    dormant   — scheduled (cron) functions pause
Day ~104  purged    — permanent deletion

# Renew anytime during grace to reactivate instantly:
POST /tiers/v1/:tier  (x402, MPP, or Stripe)

Your agent wants to ship.

It just doesn't know Run402 exists yet.

Do this: paste this into your agent's chat.

Please build me a demo app using run402.com/llms-cli.txt (curl it)