{
  "name": "SubEtha Proof of Call live demo",
  "descriptor": "Receipts for paid API calls.",
  "story": [
    "1. Recorded example: two workers handed in the same answer; the requester's record shows 'Call verified' for one and 'Call not verified' (no proof bundle) for the other. Payment was recorded for both. See recordedExamples.",
    "2. Fresh run: POST /api/runs starts one paid call now, with the team's test funds (a single call, no language model).",
    "3. Connect your own agent over MCP (bringYourOwnAgent). Your agent selects APIs and submits its answer. This service approves, pays for and executes the calls on its behalf.",
    "4. Trust boundary: 'call verified' is a statement to a requester who trusts the Router as witness and, in proxy mode, the Router-to-provider network path. Whether an answer is right is not checked; a sentence can quote a real, matched value and still be false."
  ],
  "recordedExamples": {
    "note": "Pinned records of testnet runs of 2026-12-04, arranged to show one thing each. Not live; the worker in them is a script with fixed wording.",
    "list": "/showcase",
    "sameAnswerCallVerified": {
      "record": "/showcase/pair-call-verified",
      "report": "/showcase/pair-call-verified/report"
    },
    "sameAnswerNoProofBundle": {
      "record": "/showcase/pair-no-proof-bundle",
      "report": "/showcase/pair-no-proof-bundle/report"
    },
    "twoCallsWithAFalseSentenceOnPurpose": {
      "record": "/showcase/two-calls-quotes",
      "report": "/showcase/two-calls-quotes/report"
    },
    "answerMentionsOneCallLedgerShowsTwo": {
      "record": "/showcase/ledger-shows-two",
      "report": "/showcase/ledger-shows-two/report"
    },
    "refusedBeforePayment": {
      "record": "/showcase/refused-before-payment",
      "report": "/showcase/refused-before-payment/report"
    }
  },
  "testTheBoundaries": [
    {
      "experiment": "Submit a quote that is not in the verified response",
      "request": "finish(taskId, answer, claims: [{ text: \"ETH mark price is 9999.99\", callNumber: 1, quote: \"9999.99\" }])",
      "expected": "that claim: quote_not_in_response (quote not matched)"
    },
    {
      "experiment": "Ask to be paid for an API outside the mandate",
      "request": "call_paid_api(taskId, url: \"https://api.coingecko.com/api/v3/simple/price\"), or POST /api/runs {\"scenario\":\"refused\",\"api\":\"<key>\",\"askHost\":\"api.coingecko.com\",\"askPath\":\"/api/v3/simple/price\"}",
      "expected": "refused before any payment (api_not_allowed)"
    },
    {
      "experiment": "Put a real quoted value inside a misleading sentence (succeeds on purpose)",
      "request": "finish(...) with a claim whose quote is a value the API returned and whose text says something false about it",
      "expected": "quote matched (backed): what a claim means is not checked",
      "recorded": "/showcase/two-calls-quotes/report#claim-5"
    }
  ],
  "timing": {
    "paidRun": "about 29 seconds on this host (the median of its last few verified runs)",
    "typicalPaidRunSeconds": 29,
    "agentTask": "one paid call takes about 29 seconds on this host (the median of its last few verified calls), so a task of 2 calls about 58 seconds and one of 3 about 87 seconds, plus any wait in the queue"
  },
  "network": "Base Sepolia (testnet); team-funded; no wallet needed",
  "guide": "/llms.txt",
  "scenarios": {
    "refused": "The worker asks for an API the mandate does not name: refused before any payment.",
    "verified": "The worker calls the named API under the Router's zkTLS Verifier: verified.",
    "skipped-api": "The worker returns a report without calling the API: not verified."
  },
  "apis": [
    {
      "key": "eth-snapshot",
      "url": "https://provider-x402-base.subethalabs.com/v1/eth/snapshot",
      "description": "ETH market snapshot (SubEtha's own x402 Provider, 0.01 test USDC per call)",
      "mandateCapAtomic": "12000"
    },
    {
      "key": "hello",
      "url": "https://tollbooth-hello-testnet.sjwilliams8.workers.dev/hello",
      "description": "Hello (a third-party x402 test API, 0.001 test USDC per call)",
      "mandateCapAtomic": "3000"
    }
  ],
  "endpoints": [
    {
      "method": "POST",
      "path": "/api/runs",
      "body": {
        "scenario": "refused | verified | skipped-api",
        "api": "eth-snapshot | hello",
        "askHost": "(refused only, optional) host the worker asks for",
        "askPath": "(refused only, optional) its path"
      },
      "answer": "202 with the run and its links"
    },
    {
      "method": "GET",
      "path": "(anything)",
      "note": "GET and HEAD only read. A run is started with POST /api/runs alone."
    },
    {
      "method": "GET",
      "path": "/api/runs/{id}",
      "answer": "the run: state, steps, result, queue"
    },
    {
      "method": "GET",
      "path": "/api/runs/{id}/events",
      "answer": "server-sent events: the run after every change"
    },
    {
      "method": "GET",
      "path": "/api/runs",
      "answer": "recent runs"
    },
    {
      "method": "GET",
      "path": "/api/status",
      "answer": "whether runs are accepted, queue, remaining test budget"
    },
    {
      "method": "GET",
      "path": "/",
      "answer": "the front page: recorded runs (same answer, different evidence)"
    },
    {
      "method": "GET",
      "path": "/run",
      "answer": "the form that starts a fresh run"
    },
    {
      "method": "GET",
      "path": "/showcase, /showcase/{slug}, /showcase/{slug}/report",
      "answer": "the pinned records: list, JSON, report page"
    },
    {
      "method": "GET",
      "path": "/runs/{id}",
      "answer": "the run as a page"
    },
    {
      "method": "GET",
      "path": "/runs/{id}/report",
      "answer": "the requester's report (HTML)"
    }
  ],
  "bringYourOwnAgent": {
    "mcpEndpoint": "/mcp",
    "transport": "Streamable HTTP (stateless), no authentication",
    "tools": [
      "start_task(task?)",
      "call_paid_api(taskId, apiId | url, idempotencyKey?)",
      "task_status(taskId)",
      "finish(taskId, answer, claims[])"
    ],
    "claudeCode": "claude mcp add --transport http proof-of-call <origin>/mcp",
    "testedPrompt": "Use the proof-of-call tools. Start a task with this task: \"Which moved more over the last 24 hours in percent, ETH or SOL? Give both mark prices.\" Before anything else, ask the requester to pay for one API that is NOT on the task's list, https://api.coingecko.com/api/v3/simple/price, and tell me what happened. Then do the task with the APIs on the list. Finish with claims that quote the values exactly as the responses give them, then show me the verdict and the report link. If a call is pending, poll task_status; do not run shell commands.",
    "claudeWebOrDesktop": "Customize > Connectors > \"+ Add\" > \"Add custom connector\", paste <origin>/mcp. Steps as in Anthropic's help article; not run by us.",
    "chatGpt": "Not tested. On the account we looked at, Settings showed no way to add a custom MCP server; it likely needs developer mode.",
    "otherClients": "Add a remote MCP server (Streamable HTTP, no authentication) with the same address. Not tested by us.",
    "closedTask": [
      "/tasks/{taskId}",
      "/tasks/{taskId}/report"
    ],
    "notChecked": "The answer's own text and the meaning of a claim are not checked: only each claim's quote is compared with the proven response of a verified call."
  },
  "whatVerifiedMeans": "Verified means: the API named in the mandate (host, path, method) was called with the payment credential issued for this purchase, in a TLS session the Router's Verifier witnessed; it answered 200; and the requester decrypted the proven response with its own key.",
  "whoIsTrusted": "It is a statement about the call, made to a requester who trusts the Router as the witness. In proxy mode the Router connects to the API and relays the encrypted traffic, so the network path between the Router and the API is trusted too. It proves nothing to someone who does not trust the Router, and it says nothing about the quality of the worker's report.",
  "nonClaims": [
    "the quality or correctness of the deliverable, or of the API's response",
    "that the worker used no other API",
    "who ran the executor",
    "that the deliverable's text was derived from the proven response",
    "that the worker does not collude with an attacker on the Router-to-Provider path (proxy mode)",
    "isolation of the requester's keys from a malicious process of the same user on the same host",
    "that the upstream executed exactly once",
    "that the worker showed the response to no one",
    "the name or content of the Provider's receipt header: the requester checks only that the Router recorded a receipt digest",
    "chain finality",
    "anything to a third party who does not trust the Router"
  ],
  "parties": {
    "requester": "0xAD961493e3Ec4FEDEe72B1Aa2450deB27BE9D4f0",
    "routerInbound": "0x72c3dE7fE16DF7f2462fC724e0b42db79F0C7689",
    "routerOutbound": "0xdFcCEfe8A9274B206292C1adfD3E9ed07411e677",
    "howToReadTheInboundTransaction": "The requester signs a transfer authorization (EIP-3009) and a facilitator submits it on chain, often batched through Multicall3. So the explorer's “From” of the Requester → Router transaction is the facilitator or a relayer contract, not the requester: read the USDC Transfer event inside it (from the requester's address to the Router's inbound recipient)."
  },
  "routerFee": "The Router's fee is a flat amount per purchase, set by the Router's operator; the requester pays it on top of the API's price.",
  "rateLimits": {
    "paid": {
      "perIpPerHour": 6,
      "perIpPerDay": 20,
      "globalPerHour": 40
    },
    "free": {
      "perIpPerHour": 30,
      "perIpPerDay": 100,
      "globalPerHour": 200
    }
  },
  "notAvailableYet": "The proof bundle itself, or a Router-signed verdict, for checking offline.",
  "hireByEnsName": {
    "page": "/hire",
    "requester": "Sponsored requester; team test funds (operated by SubEtha). No wallet needed.",
    "defaultName": "research.subetha-agents.eth",
    "endpoints": [
      {
        "method": "GET",
        "path": "/api/hire",
        "answer": "names, sponsor allowlist, paid APIs of the witness catalogue, fixed caps, disclosures"
      },
      {
        "method": "POST",
        "path": "/api/hire/resolve",
        "body": {
          "name": "<ENS name>"
        },
        "answer": "the ENS records read at one pinned block, explorer links, whether the name is sponsored (the endpoint is not contacted)"
      },
      {
        "method": "POST",
        "path": "/api/hire",
        "body": {
          "name": "<sponsored ENS name>",
          "apis": "[up to 2 api ids]"
        },
        "answer": "202 with the hire id; spends team test funds; one hire at a time; 403 not_sponsored for other names"
      },
      {
        "method": "GET",
        "path": "/api/hire/{id}",
        "answer": "the hire from the requester's records: steps, calls (policy, paid, witnessed, verified), signed answer, quotes matched, spending, the no-call contrast, disclosures; hire.signedTexts (exact signed texts, signatures, expected signer) and independentCheck (cast / viem one-liners)"
      },
      {
        "method": "GET",
        "path": "/api/hires",
        "answer": "the latest hires, newest first (at most 10), public fields only, with their pages"
      },
      {
        "method": "GET",
        "path": "/api/hire/directory",
        "answer": "the agents found on chain under subetha-agents.eth (ENSv2 subregistry events), each resolved: agent records, sponsored or not"
      }
    ],
    "readEnsYourself": {
      "cast": "cast abi-decode \"f()(address)\" $(cast call --rpc-url \"$SEPOLIA_RPC\" 0xeEeEEEeE14D718C2B47D9923Deab1335E144EeEe \"resolve(bytes,bytes)(bytes,address)\" 0x0872657365617263680e737562657468612d6167656e74730365746800 $(cast calldata \"addr(bytes32)\" $(cast namehash research.subetha-agents.eth)) | head -1)",
      "viem": "node --input-type=module -e \"import {createPublicClient,http} from 'viem'; import {sepolia} from 'viem/chains'; const c=createPublicClient({chain:sepolia,transport:http(process.env.SEPOLIA_RPC)}); const name='research.subetha-agents.eth'; console.log(await c.getEnsAddress({name}), await c.getEnsText({name,key:'agent-context'}), await c.getEnsText({name,key:'agent-endpoint[mcp]'}))\""
    },
    "caps": {
      "maxApis": 2,
      "maxCalls": 2,
      "totalMaxAtomic": "30000"
    },
    "noCallContrast": "a local labelled no-call worker (no ENS name, no signature) handing in the hired worker's answer without any paid call",
    "nestedHire": {
      "enabled": true,
      "request": {
        "method": "POST",
        "path": "/api/hire",
        "body": {
          "name": "<one of: research.subetha-agents.eth>",
          "apis": "[api ids]",
          "delegated": true
        },
        "answer": "202 with \"mode\": \"nested\""
      },
      "subWorkerNames": [
        "worker-01.subetha-agents.eth"
      ],
      "answerFields": {
        "mode": "\"nested\"",
        "hire.calls": "the hired worker's own calls (it may make none: its sub-worker makes them)",
        "hire.summary.wholeHire": "read this first: the whole hire (reservedCalls, paidCalls, verifiedCalls, committedAtomic, committedTestUsdc), the worker's own calls plus its sub-workers'; null in a plain hire, whose summary is itself the whole hire",
        "hire.summary.tree": "the same totals with their parts: the worker's own calls (own), its sub-workers' (subWorkers), complete (whether the requester's records were all read and agree), from the requester's own records; inProgress: true while the hire is still running (totals provisional)",
        "independentCheck.subWorkers[]": "the signature checks (cast) and ENS one-liners filled in for each sub-worker, by its index in delegated.children",
        "delegated.tree": "the budget tree: per node the caps and what was used",
        "delegated.children[]": "each sub-worker: ensName, ENS snapshot, calls (policy, paid, witnessed, verified), answer and claims (untrusted text), summary, budget, attribution",
        "delegated.children[].signedTexts": "the exact texts the sub-worker signed, the signatures and its expected signer"
      },
      "note": "A sub-worker's signed answer is attribution, not verification: only calls the requester paid for and verified itself back a claim."
    }
  }
}
