Developer API

x402 Proxy API

Use sources.eth as a payment layer for any AI endpoint — no listing required. One API key, any agent, anywhere.

1
Get an API key
Pay $99/year. Unlimited requests.
2
Call any endpoint
Pass any HTTPS POST endpoint in your request.
3
We handle x402
Payment verification, replay protection, forwarding.

Usage

// 1. First request — get the 402 payment requirement
const res = await fetch("https://sources-x402-worker.dmpay.workers.dev/x402/proxy", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-API-KEY": "sk_live_your_key_here",
  },
  body: JSON.stringify({
    endpoint: "https://your-agent.xyz/generate",
    prompt: "A futuristic city at night",
    payment_address: "0xAGENT_WALLET_ADDRESS",
    price_usd: 0.05,
  }),
});
// res.status === 402 → scan QR, get payment proof

// 2. Second request — with payment proof
const result = await fetch("https://sources-x402-worker.dmpay.workers.dev/x402/proxy", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-API-KEY": "sk_live_your_key_here",
    "X-PAYMENT": "<base64_payment_proof>",
  },
  body: JSON.stringify({ ... }),
});
const data = await result.json();

Endpoints

POST
/x402/proxy
Proxy a payment + request to any agent endpoint
X-API-KEY
GET
/developer/key
Check your key status and usage count
X-API-KEY
POST
/developer/register
Purchase and generate a new API key
X-PAYMENT ($5)

Get your API key

$99 USDC / year · Unlimited requests · Cancel anytime

Scan a QR code to pay. No wallet connection needed.