{"slug":"brain-testnet-usebrainchain-com-x402-grades-07381a","title":"BrainChain grades a result against your brief and records the decision on chain","host":"brain.testnet.usebrainchain.com","method":"POST","resource":"https://brain.testnet.usebrainchain.com/x402/grades","category":"other","description":"BrainChain grades a result against your brief and records the decision on chain. For work done anywhere.","price_listed":0.25,"price_asked":0.25,"state":"answering","state_label":"Answering","checks_7d":5,"answered_7d":5,"latency_ms_median":1243,"reported_calls_30d":15,"reported_payers_30d":3,"networks":["eip155:46630","eip155:84532"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"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"},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"properties":{"brief":{"description":"What the work had to do. BrainChain reads nothing else about the job.","maxLength":32000,"minLength":1,"type":"string"},"checks":{"description":"Code that tests the delivered code. Optional. BrainChain appends it to the code blocks of result in that language and runs the whole as one program in its sandbox before any model grades. Work whose run fails or times out, or that has no code in that language, is rejected at full confidence. The code blocks of result in that language and code together can be at most 64,000 characters, and 128,000 escaped as JSON. The checks are published with the brief. Sent without checks, a block in brief fenced as python checks or javascript checks is run the same way.","properties":{"code":{"description":"The checks, with no ``` in them.","maxLength":32000,"minLength":1,"type":"string"},"language":{"enum":["python","javascript"],"type":"string"}},"required":["language","code"],"type":"object"},"levels":{"description":"Quality levels, best first. Optional; the default is: Does everything the brief asks, correctly and completely / Does what the brief asks, with minor gaps / Misses what the brief asks.","items":{"maxLength":200,"minLength":1,"type":"string"},"maxItems":5,"minItems":2,"type":"array"},"pass":{"description":"Index of the lowest level that passes, 0 being the best; the last level never passes. Optional; the default is 1, or 0 with two levels.","minimum":0,"type":"integer"},"result":{"description":"The delivered work, as text, at most 100,000 bytes.","minLength":1,"type":"string"},"title":{"description":"One line naming the deliverable. Optional.","maxLength":120,"type":"string"}},"required":["brief","result"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"properties":{"accepted":{"description":"The work is accepted: passProbability is at or above bar.","type":"boolean"},"answer":{"description":"The answer recorded on chain.","enum":["accept","reject"],"type":"string"},"bar":{"description":"The probability of a passing level the work needs to be accepted, 0 to 1.","type":"number"},"checks":{"description":"How the request's checks ran, when it sent any. Work whose run did not pass is rejected with passProbability 0.","properties":{"error":{"description":"The exception that stopped the run. Only in the reply to a request that carries the result.","type":"string"},"language":{"enum":["python","javascript"],"type":"string"},"outcome":{"enum":["passed","failed","timed out"],"type":"string"},"output":{"description":"Up to 4,000 characters of what the run printed. Only in the reply to a request that carries the result.","type":"string"}},"type":"object"},"confidence":{"description":"How sure the recorded answer is, 0 to 1.","type":"number"},"decision":{"properties":{"id":{"type":"string"},"page":{"type":"string"},"record":{"type":"string"}},"type":"object"},"grade":{"type":"string"},"levels":{"description":"BrainChain's probability for each level, best first.","items":{"properties":{"level":{"type":"string"},"passes":{"type":"boolean"},"probability":{"type":"number"}},"type":"object"},"type":"array"},"passProbability":{"description":"The probability that the work reaches a passing level, the lower of BrainChain's and the second grader's, 0 to 1.","type":"number"},"receipt":{"description":"Signed by the brain key that records BrainChain's decisions: what was paid, by whom and in which transaction, the decision the outcome stands on and its evidence hash. EIP-712, domain BrainChain receipt version 1 on the decision log. Check it offline against the log's brain.","properties":{"format":{"enum":["eip712"],"type":"string"},"payload":{"type":"object"},"signature":{"type":"string"}},"required":["format","payload","signature"],"type":"object"},"second":{"description":"The second grader's probability of a passing level, when it was asked.","properties":{"model":{"type":"string"},"passProbability":{"type":"number"}},"type":"object"},"state":{"enum":["paying","unconfirmed","failed","paid","graded"],"type":"string"},"status":{"description":"Where to read this grade again.","type":"string"}},"required":["grade","state","status"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-11-26","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.25,"price_match":true,"latency_ms":1248,"error":null},{"day":"2026-11-25","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.25,"price_match":true,"latency_ms":1263,"error":null},{"day":"2026-11-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.25,"price_match":true,"latency_ms":1070,"error":null},{"day":"2026-11-23","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.25,"price_match":true,"latency_ms":1243,"error":null},{"day":"2026-11-22","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.25,"price_match":true,"latency_ms":1088,"error":null}],"description_full":"BrainChain grades a result against your brief and records the decision on chain. For work done anywhere.","last_updated":"2026-11-25T09:41:08.744Z","schemes":["exact"]}