Quickstart

Discover for free. Pay only for an authorized call.

Start with the free 230-service index, choose one implemented capability, then use an x402 V1 or V2 buyer client for the HTTP 402 challenge and identical paid retry. V2 remains the canonical example below.

2. Make a schema-valid unpaid probe

The response is one HTTP 402 with a canonical V2 PAYMENT-REQUIRED header and equivalent V1 JSON body. The provider job does not run. An authorized retry sends exactly one payment header: PAYMENT-SIGNATURE for V2 or X-PAYMENT for V1.

curl -i -X POST https://signalharness.ai/api/agent/services/json_schema_validate/invoke \
  -H "Content-Type: application/json" \
  --data '{"value":{"example":true},"schema":{"type":"object"}}'

3. Use an x402 payment client

Install @coinbase/cdp-sdk and @x402/fetch. The wallet must be explicitly authorized, hold enough Base USDC, and enforce your spending policy. Never place wallet credentials in browser code.

import { CdpX402Client } from "@coinbase/cdp-sdk/x402";
import { wrapFetchWithPayment } from "@x402/fetch";

// Configure CDP credentials and an authorized, funded Base wallet in server-side environment variables.
const client = new CdpX402Client();
const fetchWithPayment = wrapFetchWithPayment(fetch, client);
const response = await fetchWithPayment("https://signalharness.ai/api/agent/services/json_schema_validate/invoke", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "value": {
    "example": true
  },
  "schema": {
    "type": "object"
  }
})
});
if (!response.ok) throw new Error(`SignalHarness request failed: ${response.status}`);
console.log(await response.json());

Before signing, verify method, URL, amount, Base network, USDC asset, recipient, and expiry from the live challenge. SignalHarness prices range from 5000 to 50000 atomic USDC (0.005-0.05 USDC) per call.

4. Confirm delivery

Treat the call as complete only after HTTP success, payment verification, settlement/finality, a receipt, and a valid service response. On ambiguity, use the safe retry rules in the x402 guide; never create a fresh payment merely because a response was lost.