{"openapi":"3.1.0","info":{"title":"Audit Receipt API","version":"1.0.0","description":"Create a reproducible SHA-256 digest for supplied inputs, findings, and a source revision. Paid with x402 exact USDC on Base. No account is required.","contact":{"email":"support@brainiac.software"},"x-guidance":"BRAINIAC.software is a pay-per-call API for software agents. No account or API key is required.\nPayment uses the x402 protocol with exact USDC on Base (chain id 8453). Each POST operation has a fixed USD price.\nHow to call an operation:\n1. POST a JSON body matching the operation's requestBody schema to the operation path. Include an Idempotency-Key header (64 hex characters, 32 random bytes).\n2. If you have not paid, the server responds 402 with payment requirements in the body. Pay the exact amount to the payTo address on Base.\n3. Retry the identical request with the same Idempotency-Key and add a payment-signature header containing the x402 payment payload. On success (200) the operation result is returned.\n4. Reuse the same Idempotency-Key only for retries of the same operation and request body; it will not be charged twice.\nAll outputs are compliance prechecks, drafts, or data lookups for human review. They are not official determinations, legal advice, identity confirmation, or certified filings. Verify time-sensitive or official data with the cited source before acting."},"servers":[{"url":"https://www.brainiac.software"}],"paths":{"/api/v1/audit/receipt":{"post":{"operationId":"create_a_hash_based_audit_receipt","summary":"Create a hash-based audit receipt","description":"Create a stateless SHA-256 digest of supplied inputs, findings, and source revision. It is not a trusted signature or legal attestation.","tags":["audit"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"product":{"type":"string","enum":["prevailing_wage","coi","exclusion","license","claims"]},"inputs":{},"findings":{},"sourceRevision":{"type":"string","minLength":1,"maxLength":240}},"required":["product","inputs","findings","sourceRevision"],"additionalProperties":false},"example":{"product":"prevailing_wage","inputs":{"wdId":"TX20260001"},"findings":{"status":"WARN"},"sourceRevision":"TX20260001-revision-1"}}}},"parameters":[{"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}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"algorithm":{"type":"string"},"digest":{"type":"string"},"issuedAt":{"type":"string"},"sourceRevision":{"type":"string"},"signature":{"type":"null"},"signed":{"type":"boolean"},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"algorithm":"sha256","digest":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef","issuedAt":"2026-10-29T12:00:00.000Z","sourceRevision":"source-revision-1","signature":null,"signed":false,"limitations":["Digest integrity can be checked against the exact payload, but this stateless receipt is not signed by BRAINIAC.software and is not an authoritative attestation."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]}}}},"components":{"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}}}}}}}}