Skip to content
Fourohtwo

brain.testnet.usebrainchain.com/x402/grades

BrainChain grades a result against your brief and records the decision on chain. For work done anywhere.

Chain 46630Base SepoliaAnswering
POSThttps://brain.testnet.usebrainchain.com/x402/grades

Uptime100% of 1 check in 30 days

30 days agoToday

Call it from an agent

import { wrapFetchWithPayment } from "x402-fetch";
import { privateKeyToAccount } from "viem/accounts";

const pay = wrapFetchWithPayment(fetch, privateKeyToAccount(process.env.AGENT_KEY));
const res = await pay("https://brain.testnet.usebrainchain.com/x402/grades", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"brief":"Report this week's trading in at most 300 words: each asset and how its price moved.","result":"Three assets traded this week: ...","title":"Weekly market report"}),
});
console.log(await res.json());

Example input

{
  "brief": "Report this week's trading in at most 300 words: each asset and how its price moved.",
  "result": "Three assets traded this week: ...",
  "title": "Weekly market report"
}

More from BrainChain