{"openapi":"3.1.0","info":{"title":"Compute Tools API","version":"1.0.0","description":"Run real jq 1.8.2 filters, batch-grade jq conformance cases, solve or validate Rubik's Cube states, and produce RFC 6902 JSON or text diffs from caller input. No account or API key needed for pay-as-you-go calls; sign in for a monthly free quota.","contact":{"email":"support@brainiac.software"},"x-discovery":{"ownershipProofs":["0xc756d68bad9103556337c433239fa248983c66b137cb377070f3e54f4659fb5802c17f6f23a175230ab96cba82594acc89e3c78c9a0967e4b528952f5f0c05031c"]},"x-guidance":"BRAINIAC.software is a pay-per-call API for software agents. No account or API key needed for pay-as-you-go calls; sign in for a monthly free quota.\nThis root OpenAPI is a token-light discovery index. Full request/response schemas and examples are at /api/{group}/openapi.json; x-api-groups lists every group URL.\nPayment uses x402 with exact USDC on Base (8453). Unpaid GET/HEAD/POST return 402 payment terms for discovery.\nHow to call: POST JSON → verify payTo/asset/network against /api/v1/catalog and /.well-known/x402 → pay and retry with payment-signature. Settlement only on HTTP 2xx.\nIdempotency-Key: 64 hex chars. Coverage HTTP 2xx with status complete|partial and real data is charged; failed or empty results are not charged. Free lookup: GET /api/v1/results/{result_id}.\nOutputs are drafts for human review - not official determinations or legal advice."},"servers":[{"url":"https://www.brainiac.software"}],"paths":{"/api/v1/compute-tools/jq-output":{"post":{"operationId":"compute_tools_jq_output","summary":"Run a jq filter","description":"Run a caller-supplied jq filter against JSON input with real jq 1.8.2 compiled to WebAssembly. Docs: https://www.brainiac.software/api/compute-tools/jq-output","externalDocs":{"url":"https://www.brainiac.software/api/compute-tools/jq-output"},"tags":["compute-tools","jq","json-transform","x402","when grading filters or transforming payloads","filter","input","options","jq 1.8.2","jq-wasm","stdout","outputs","exitCode","Run a jq filter","jq output"],"x-keywords":["when grading filters or transforming payloads","filter","input","options","jq 1.8.2","jq-wasm","stdout","outputs","exitCode","Run a jq filter","jq output"],"x-empty-json-probe":false,"x-probe-body":{"filter":".items[] | select(.qty > 1) | .sku","input":{"items":[{"sku":"A-1","qty":2},{"sku":"B-2","qty":1}]},"options":{"compact":true}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filter":{"type":"string","minLength":1,"maxLength":4096},"input":{"anyOf":[{"type":"string","maxLength":1000000},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"options":{"type":"object","properties":{"nullInput":{"type":"boolean"},"rawInput":{"type":"boolean"},"slurp":{"type":"boolean"},"rawOutput":{"type":"boolean"},"compact":{"type":"boolean"},"sortKeys":{"type":"boolean"},"args":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"jsonArgs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false}},"required":["filter","input"],"additionalProperties":false},"example":{"filter":".items[] | select(.qty > 1) | .sku","input":{"items":[{"sku":"A-1","qty":2},{"sku":"B-2","qty":1}]},"options":{"compact":true}}}}},"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"JSON result. A settled 2xx includes payment-response. Settlement is only for HTTP 2xx with status complete or partial and real data; status failed or empty payloads return non-2xx and are not charged.","headers":{"payment-response":{"$ref":"#/components/headers/PaymentResponse"}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"stdout":{"type":"string"},"outputs":{"type":"array","items":{"type":"string"}},"exitCode":{"type":"number"},"error":{"type":"null"},"elapsedMs":{"type":"number"},"truncated":{"type":"boolean"},"overdue":{"type":"boolean"},"jqVersion":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"licence":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"status":"complete","stdout":"\"A-1\"","outputs":["A-1"],"exitCode":0,"error":null,"elapsedMs":7,"truncated":false,"overdue":false,"jqVersion":"1.8.2","sources":[{"source":"jq 1.8.2 via jq-wasm 3.0.0-jq-1.8.2","url":"https://github.com/jqlang/jq","licence":"MIT","retrievedAt":"2026-07-05","status":"ok"}],"limitations":["No $ENV, input_filename, module loading, or filesystem access.","The 2 s wall budget is measured, not pre-emptive; a pathological filter can run longer."]}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"},"409":{"$ref":"#/components/responses/IdempotencyConflict"},"413":{"$ref":"#/components/responses/RequestTooLarge"},"500":{"$ref":"#/components/responses/OperationFailed"},"502":{"$ref":"#/components/responses/SettlementUnknown"},"503":{"$ref":"#/components/responses/PaymentsUnavailable"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{"facilitator":"https://facilitator.ultravioletadao.xyz"}}],"facilitator":"https://facilitator.ultravioletadao.xyz"}}},"/api/v1/compute-tools/jq-outputs":{"post":{"operationId":"compute_tools_jq_outputs","summary":"Batch-grade jq filters","description":"Run up to 100 jq filter cases against real jq 1.8.2, compare each result with an expected value, and return an RFC 6902 patch for every mismatch. Docs: https://www.brainiac.software/api/compute-tools/jq-outputs","externalDocs":{"url":"https://www.brainiac.software/api/compute-tools/jq-outputs"},"tags":["compute-tools","jq","json-transform","x402","when grading filter conformance","cases","expected","matches","diff","jq 1.8.2","Batch-grade jq filters","jq outputs"],"x-keywords":["when grading filter conformance","cases","expected","matches","diff","jq 1.8.2","Batch-grade jq filters","jq outputs"],"x-empty-json-probe":false,"x-probe-body":{"cases":[{"id":"sku","filter":".items[] | select(.qty > 1) | .sku","input":{"items":[{"sku":"A-1","qty":2},{"sku":"B-2","qty":1}]},"expected":"A-1"}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"cases":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"filter":{"type":"string","minLength":1,"maxLength":4096},"input":{"anyOf":[{"type":"string","maxLength":1000000},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"options":{"type":"object","properties":{"nullInput":{"type":"boolean"},"rawInput":{"type":"boolean"},"slurp":{"type":"boolean"},"rawOutput":{"type":"boolean"},"compact":{"type":"boolean"},"sortKeys":{"type":"boolean"},"args":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"jsonArgs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false},"expected":{"anyOf":[{"type":"string","maxLength":1000000},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"required":["id","filter","input"],"additionalProperties":false}}},"required":["cases"],"additionalProperties":false},"example":{"cases":[{"id":"sku","filter":".items[] | select(.qty > 1) | .sku","input":{"items":[{"sku":"A-1","qty":2},{"sku":"B-2","qty":1}]},"expected":"A-1"}]}}}},"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"JSON result. A settled 2xx includes payment-response. Settlement is only for HTTP 2xx with status complete or partial and real data; status failed or empty payloads return non-2xx and are not charged.","headers":{"payment-response":{"$ref":"#/components/headers/PaymentResponse"}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"jqVersion":{"type":"string"},"cases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"stdout":{"type":"string"},"outputs":{"type":"array","items":{"type":"string"}},"exitCode":{"type":"number"},"error":{"type":"null"},"elapsedMs":{"type":"number"},"truncated":{"type":"boolean"},"overdue":{"type":"boolean"},"matches":{"type":"boolean"}},"additionalProperties":true}},"summary":{"type":"object","properties":{"total":{"type":"number"},"passed":{"type":"number"},"failed":{"type":"number"},"errored":{"type":"number"}},"additionalProperties":true},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"licence":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"status":"complete","jqVersion":"1.8.2","cases":[{"id":"sku","status":"complete","stdout":"\"A-1\"","outputs":["A-1"],"exitCode":0,"error":null,"elapsedMs":4,"truncated":false,"overdue":false,"matches":true}],"summary":{"total":1,"passed":1,"failed":0,"errored":0},"sources":[{"source":"jq 1.8.2 via jq-wasm 3.0.0-jq-1.8.2","url":"https://github.com/jqlang/jq","licence":"MIT","retrievedAt":"2026-07-05","status":"ok"}],"limitations":["No $ENV, input_filename, module loading, or filesystem access.","The 2 s wall budget is measured, not pre-emptive; a pathological filter can run longer."]}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"},"409":{"$ref":"#/components/responses/IdempotencyConflict"},"413":{"$ref":"#/components/responses/RequestTooLarge"},"500":{"$ref":"#/components/responses/OperationFailed"},"502":{"$ref":"#/components/responses/SettlementUnknown"},"503":{"$ref":"#/components/responses/PaymentsUnavailable"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{"facilitator":"https://facilitator.ultravioletadao.xyz"}}],"facilitator":"https://facilitator.ultravioletadao.xyz"}}},"/api/v1/compute-tools/cube-solution":{"post":{"operationId":"compute_tools_cube_solution","summary":"Solve a Rubik's Cube","description":"Solve a Rubik's Cube from 54 facelets or a WCA face-turn scramble with the Kociemba two-phase algorithm. Docs: https://www.brainiac.software/api/compute-tools/cube-solution","externalDocs":{"url":"https://www.brainiac.software/api/compute-tools/cube-solution"},"tags":["compute-tools","rubiks-cube","kociemba","x402","when testing a solver or grading scramble solutions","facelets","scramble","maxLength","HTM","verified","Solve a Rubik's Cube","cube solution"],"x-keywords":["when testing a solver or grading scramble solutions","facelets","scramble","maxLength","Kociemba","HTM","verified","Solve a Rubik's Cube","cube solution"],"x-empty-json-probe":false,"x-probe-body":{"scramble":"R U R' U' F2"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"facelets":{"type":"string","minLength":54,"maxLength":54,"pattern":"^[URFDLB]+$"},"scramble":{"type":"string","minLength":1,"maxLength":600},"maxLength":{"default":22,"type":"integer","minimum":1,"maximum":30}},"additionalProperties":false,"minProperties":1},"example":{"scramble":"R U R' U' F2"}}}},"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"JSON result. A settled 2xx includes payment-response. Settlement is only for HTTP 2xx with status complete or partial and real data; status failed or empty payloads return non-2xx and are not charged.","headers":{"payment-response":{"$ref":"#/components/headers/PaymentResponse"}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"solution":{"type":"string"},"moves":{"type":"number"},"verified":{"type":"boolean"},"startFacelets":{"type":"string"},"metric":{"type":"string"},"errors":{"type":"array","items":{}},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"licence":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"status":"complete","solution":"F2 U R U' R U2 D2 R2 L2 U2 D2 L2","moves":12,"verified":true,"startFacelets":"UULUUFRDDLRULRRLRRFFFUFFDFFFUUDDDDDDBLULLBLLRBRRBBBBBB","metric":"HTM","errors":[],"sources":[{"source":"cubejs 1.3.2 (Kociemba two-phase solver)","url":"https://github.com/ldez/cubejs","licence":"MIT","retrievedAt":"2019-04-27","status":"ok"}],"limitations":["Half-turn metric face-turn solution from the Kociemba two-phase solver.","Wide, slice, and rotation moves are not accepted in scrambles."]}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"},"409":{"$ref":"#/components/responses/IdempotencyConflict"},"413":{"$ref":"#/components/responses/RequestTooLarge"},"500":{"$ref":"#/components/responses/OperationFailed"},"502":{"$ref":"#/components/responses/SettlementUnknown"},"503":{"$ref":"#/components/responses/PaymentsUnavailable"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{"facilitator":"https://facilitator.ultravioletadao.xyz"}}],"facilitator":"https://facilitator.ultravioletadao.xyz"}}},"/api/v1/compute-tools/cube-state":{"post":{"operationId":"compute_tools_cube_state","summary":"Validate Rubik's Cube state","description":"Validate a 54-facelet Rubik's Cube state or WCA scramble before solving. Docs: https://www.brainiac.software/api/compute-tools/cube-state","externalDocs":{"url":"https://www.brainiac.software/api/compute-tools/cube-state"},"tags":["compute-tools","rubiks-cube","kociemba","x402","when checking impossible cubes","facelets","scramble","corner twist","edge flip","permutation parity","Validate Rubik's Cube state","cube state"],"x-keywords":["when checking impossible cubes","facelets","scramble","corner twist","edge flip","permutation parity","Validate Rubik's Cube state","cube state"],"x-empty-json-probe":false,"x-probe-body":{"facelets":"UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"facelets":{"type":"string","minLength":54,"maxLength":54,"pattern":"^[URFDLB]+$"},"scramble":{"type":"string","minLength":1,"maxLength":600}},"additionalProperties":false,"minProperties":1},"example":{"facelets":"UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB"}}}},"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"JSON result. A settled 2xx includes payment-response. Settlement is only for HTTP 2xx with status complete or partial and real data; status failed or empty payloads return non-2xx and are not charged.","headers":{"payment-response":{"$ref":"#/components/headers/PaymentResponse"}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"valid":{"type":"boolean"},"errors":{"type":"array","items":{}},"facelets":{"type":"string"},"solved":{"type":"boolean"},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"licence":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"status":"complete","valid":true,"errors":[],"facelets":"UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB","solved":true,"sources":[{"source":"cubejs 1.3.2 (Kociemba two-phase solver)","url":"https://github.com/ldez/cubejs","licence":"MIT","retrievedAt":"2019-04-27","status":"ok"}],"limitations":["Checks piece counts, centre count, corner twist, edge flip, and permutation parity.","A scramble is applied to a standard solved cube first; wide, slice, and rotation moves are not accepted."]}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"},"409":{"$ref":"#/components/responses/IdempotencyConflict"},"413":{"$ref":"#/components/responses/RequestTooLarge"},"500":{"$ref":"#/components/responses/OperationFailed"},"502":{"$ref":"#/components/responses/SettlementUnknown"},"503":{"$ref":"#/components/responses/PaymentsUnavailable"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{"facilitator":"https://facilitator.ultravioletadao.xyz"}}],"facilitator":"https://facilitator.ultravioletadao.xyz"}}},"/api/v1/compute-tools/json-diff":{"post":{"operationId":"compute_tools_json_diff","summary":"Diff two JSON values","description":"Compare two JSON values and return an RFC 6902 patch, equality, and operation counts. Docs: https://www.brainiac.software/api/compute-tools/json-diff","externalDocs":{"url":"https://www.brainiac.software/api/compute-tools/json-diff"},"tags":["compute-tools","json-diff","rfc-6902","x402","when grading outputs or reviewing payload changes","from","to","arrayMode","RFC 6902","patch","Diff two JSON values","json diff"],"x-keywords":["when grading outputs or reviewing payload changes","from","to","arrayMode","RFC 6902","patch","Diff two JSON values","json diff"],"x-empty-json-probe":false,"x-probe-body":{"from":{"a":1,"b":[1,2]},"to":{"a":2,"b":[1,2,3]}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{},"to":{},"arrayMode":{"default":"index","type":"string","enum":["index","lcs"]}},"required":["from","to"],"additionalProperties":false},"example":{"from":{"a":1,"b":[1,2]},"to":{"a":2,"b":[1,2,3]}}}}},"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"JSON result. A settled 2xx includes payment-response. Settlement is only for HTTP 2xx with status complete or partial and real data; status failed or empty payloads return non-2xx and are not charged.","headers":{"payment-response":{"$ref":"#/components/headers/PaymentResponse"}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"equal":{"type":"boolean"},"patch":{"type":"array","items":{"type":"object","properties":{"op":{"type":"string"},"path":{"type":"string"},"value":{"type":"number"}},"additionalProperties":true}},"stats":{"type":"object","properties":{"add":{"type":"number"},"remove":{"type":"number"},"replace":{"type":"number"},"move":{"type":"number"}},"additionalProperties":true},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"licence":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"status":"complete","equal":false,"patch":[{"op":"add","path":"/b/2","value":3},{"op":"replace","path":"/a","value":2}],"stats":{"add":1,"remove":0,"replace":1,"move":0},"sources":[{"source":"fast-json-patch 3.1.1 (RFC 6902)","url":"https://github.com/Starcounter-Jack/JSON-Patch","licence":"MIT","retrievedAt":"2022-03-24","status":"ok"}],"limitations":["RFC 6902 patches are computed in-process; move operations are not emitted.","lcs mode aligns array elements by value and emits remove/add instead of move."]}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"},"409":{"$ref":"#/components/responses/IdempotencyConflict"},"413":{"$ref":"#/components/responses/RequestTooLarge"},"500":{"$ref":"#/components/responses/OperationFailed"},"502":{"$ref":"#/components/responses/SettlementUnknown"},"503":{"$ref":"#/components/responses/PaymentsUnavailable"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{"facilitator":"https://facilitator.ultravioletadao.xyz"}}],"facilitator":"https://facilitator.ultravioletadao.xyz"}}},"/api/v1/compute-tools/text-diff":{"post":{"operationId":"compute_tools_text_diff","summary":"Diff two texts","description":"Produce a unified diff and per-hunk stats for two texts in line, word, or character mode with configurable context lines. Docs: https://www.brainiac.software/api/compute-tools/text-diff","externalDocs":{"url":"https://www.brainiac.software/api/compute-tools/text-diff"},"tags":["compute-tools","text-diff","unified-diff","x402","when comparing grader outputs or source snippets","from","to","mode","context","unified diff","Diff two texts","text diff"],"x-keywords":["when comparing grader outputs or source snippets","from","to","mode","context","unified diff","Diff two texts","text diff"],"x-empty-json-probe":false,"x-probe-body":{"from":"a\nb\nc\n","to":"a\nB\nc\n","mode":"line"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string","maxLength":500000},"to":{"type":"string","maxLength":500000},"mode":{"default":"line","type":"string","enum":["line","word","char"]},"context":{"default":3,"type":"integer","minimum":0,"maximum":20}},"required":["from","to"],"additionalProperties":false},"example":{"from":"a\nb\nc\n","to":"a\nB\nc\n","mode":"line"}}}},"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"JSON result. A settled 2xx includes payment-response. Settlement is only for HTTP 2xx with status complete or partial and real data; status failed or empty payloads return non-2xx and are not charged.","headers":{"payment-response":{"$ref":"#/components/headers/PaymentResponse"}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"equal":{"type":"boolean"},"unified":{"type":"string"},"hunks":{"type":"array","items":{"type":"object","properties":{"removed":{"type":"boolean"},"value":{"type":"string"},"count":{"type":"number"},"added":{"type":"boolean"}},"additionalProperties":true}},"stats":{"type":"object","properties":{"added":{"type":"number"},"removed":{"type":"number"},"unchanged":{"type":"number"}},"additionalProperties":true},"mode":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"url":{"type":"string"},"licence":{"type":"string"},"retrievedAt":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"status":"complete","equal":false,"unified":"===================================================================\n--- from\n+++ to\n@@ -1,3 +1,3 @@\n a\n-b\n+B\n c","hunks":[{"removed":true,"value":"b","count":1},{"added":true,"value":"B","count":1}],"stats":{"added":1,"removed":1,"unchanged":2},"mode":"line","sources":[{"source":"jsdiff 9.0.0 (Myers diff)","url":"https://github.com/kpdecker/jsdiff","licence":"BSD-3-Clause","retrievedAt":"2026-04-13","status":"ok"}],"limitations":["Unified output is line-oriented even when mode is word or character.","Hunks and stats follow the selected line, word, or character mode."]}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"},"409":{"$ref":"#/components/responses/IdempotencyConflict"},"413":{"$ref":"#/components/responses/RequestTooLarge"},"500":{"$ref":"#/components/responses/OperationFailed"},"502":{"$ref":"#/components/responses/SettlementUnknown"},"503":{"$ref":"#/components/responses/PaymentsUnavailable"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{"facilitator":"https://facilitator.ultravioletadao.xyz"}}],"facilitator":"https://facilitator.ultravioletadao.xyz"}}}},"components":{"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}},"headers":{"PaymentResponse":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"responses":{"InvalidRequest":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored - fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"PaymentRequired":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"IdempotencyConflict":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"RequestTooLarge":{"description":"Request body exceeds the 24 MB limit. Not charged."},"SettlementUnknown":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain - do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"PaymentsUnavailable":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."},"OperationFailed":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."}},"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}}}}}}}}