Dexter
Dexter
Docs

Create and Deploy

Step 1: Connect Your Wallet

Open lab.dexter.cash and connect your Solana wallet. This wallet address becomes the creatorWallet that receives 70% of all revenue from your deployed APIs.

Step 2: Describe Your API

Type a description in the chat. Be specific about what the API does and how much it should cost:

  • "Build an API that returns random dad jokes for $0.005 per request"
  • "Create a content paywall that serves premium articles at $0.10 each"
  • "Build a translation API that charges $0.02 per request using GPT"

The AI (Claude Opus) generates source code, endpoint definitions, pricing configuration, and a package.json. It uses one of several x402 templates as a starting point (data-api, paywall, content-paywall, webhook, stream, gateway, access-pass, or agent).

Step 3: Review the Generated Code

Before deploying, the chat shows you what was generated:

FieldWhat it controls
nameResource display name in the marketplace
descriptionWhat appears in search results
basePriceUsdcDefault price per request in USDC
pricingModelper-request, per-token, per-minute, or flat
endpointsEach endpoint with its path, method, price, and example request body
filesThe actual TypeScript source code
envVarsEnvironment variables your API needs (API keys, etc.)
tagsCategories for marketplace discovery

You can iterate on any of these through the chat before deploying.

Step 4: Deploy

Click Deploy. Here's what happens behind the scenes:

flowchart TD
    Deploy["Click Deploy"] --> Wallet["Create managed wallet\n(Solana keypair for payTo)"]
    Wallet --> Build["Docker build from source\n+ dexter-x402-base image"]
    Build --> Container["Start container\n128MB RAM, 0.25 CPU"]
    Container --> Route["Traefik routes\n{resourceId}.dexter.cash"]
    Route --> Tests["Run verification tests"]
    Tests --> Live["Resource goes live"]
  1. Managed wallet — a Solana keypair is generated for your resource. This becomes the payTo address in x402 payment requirements.
  2. Docker build — your code is bundled with the dexter-x402-base image (Node.js, Express, TypeScript, @dexterai/x402). The base image injects x402 middleware, a health endpoint, a browser landing page, and an MCP endpoint automatically.
  3. Container start — runs with 128MB RAM, 0.25 CPU, read-only root filesystem.
  4. Routing — Traefik maps {resourceId}.dexter.cash to your container on port 3000.
  5. Verification — post-deploy tests run automatically (see Verification and Publishing).

Your API is live at https://{resourceId}.dexter.cash within seconds.

Container Limits

LimitValue
Memory128 MB
CPU0.25 cores
Root filesystemRead-only
Temp storage/tmp (tmpfs)
Max build context5 MB

What the Base Image Provides

You don't need to write payment handling code. The base image automatically adds:

  • x402Middleware on all routes — returns 402 with payment requirements
  • x402BrowserSupport — landing page for browsers hitting your API
  • /health endpoint — used by verification and monitoring
  • 404 handler
  • MCP endpoint for agent discovery

On this page