Quickstart

Calyx uses the x402 protocol — no API keys, no accounts needed. Your agent pays per request in USDC on Base L2.

Step 1: Make a request (expect a 402)

# Returns 402 Payment Required
curl -X POST https://api.calyx.market/v1/scrape \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

Step 2: Pay with x402

Use the @coinbase/x402 SDK or any x402-compatible client. The 402 response body tells you exactly how much to pay and where.

// 402 response body
{
  "x402Version": 1,
  "accepts": [
    {
      "scheme": "exact",
      "network": "base",
      "maxAmountRequired": "5000",
      "asset": "USDC",
      "payTo": "0xCalyxGateway..."
    }
  ],
  "error": "Payment required"
}

Step 3: Retry with payment header

curl -X POST https://api.calyx.market/v1/scrape \
  -H "Content-Type: application/json" \
  -H "X-PAYMENT: <your_x402_payment>" \
  -d '{"url": "https://example.com", "schema": {"title": "string"}}'

MCP Integration

Add to your MCP config:

{
  "mcpServers": {
    "calyx": {
      "url": "https://api.calyx.market/mcp"
    }
  }
}

Works with Claude, OpenClaw, and any MCP-compatible agent framework.