{"openapi":"3.1.0","info":{"title":"Certificate of Insurance API","version":"1.0.0","description":"Extract insurance certificate fields from a supplied PDF or image, compare them with contract requirements, and draft follow-up language. 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/coi/analyze":{"post":{"operationId":"extract_and_check_a_certificate_of_insurance","summary":"Extract and check a certificate of insurance","description":"Extract PDF/image fields with confidence, then compare them with contract requirements. Uncertain OCR is WARN and is never treated as verified.","tags":["coi"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"fileBase64":{"type":"string","minLength":1,"maxLength":16777216},"mediaType":{"type":"string","enum":["application/pdf","image/png","image/jpeg"]},"requirements":{"type":"object","properties":{"namedInsured":{"type":"string"},"effectiveOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"expiresAfter":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"generalLiability":{"type":"object","properties":{"eachOccurrence":{"type":"number","minimum":0},"aggregate":{"type":"number","minimum":0}},"additionalProperties":false},"workersCompensation":{"type":"object","properties":{"statutory":{"type":"boolean"},"employerLiability":{"type":"number","minimum":0}},"additionalProperties":false},"automobileLiability":{"type":"object","properties":{"combinedSingleLimit":{"type":"number","minimum":0}},"additionalProperties":false},"umbrellaLiability":{"type":"object","properties":{"eachOccurrence":{"type":"number","minimum":0},"aggregate":{"type":"number","minimum":0}},"additionalProperties":false},"additionalInsured":{"type":"boolean"},"waiverOfSubrogation":{"type":"boolean"}},"additionalProperties":false},"vendorName":{"type":"string","maxLength":200},"projectName":{"type":"string","maxLength":200}},"required":["fileBase64","mediaType","requirements"],"additionalProperties":false},"example":{"fileBase64":"JVBERi0xLjcKJYGBgYEKCjYgMCBvYmoKPDwKL0ZpbHRlciAvRmxhdGVEZWNvZGUKL0xlbmd0aCAyNDAKPj4Kc3RyZWFtCnicfVBNS0UhEN37K1wH0ejoGYUI6nYvLdoE/oGI16OoRRH9/o6+97iXoBQdHc+HMx/upjnxfX7u3cXd7u179/Xy9HhuUksqYqX6EH17dqH4du/CgAafijcR397dZcpWEHBrggk5ChTZoiVUgEsReO75BeBeMZsaEeTMHXvl26trZxSauwwyUpS0wnjXa2Z+2SSlYMckmmXoMGSGLxOnrrIZfRwhhkFOh191YRUNcTnukTEqNmQrdKz9uxuH/+m29Q6ssZCyMI6CRkmj8igxkTZpF5FTXMk2gIdWTZQIMNig26mpFIh/CczNPbgfeI1l5gplbmRzdHJlYW0KZW5kb2JqCgo3IDAgb2JqCjw8Ci9GaWx0ZXIgL0ZsYXRlRGVjb2RlCi9UeXBlIC9PYmpTdG0KL04gNQovRmlyc3QgMjYKL0xlbmd0aCAzNjgKPj4Kc3RyZWFtCnic1VJNS8NAEL3vr5ijHux+NMkmUgptkyiIWFpBUTykyVIiZVeSjdR/70zSWnoQzxIeuzPzZvdt5kkQoCAIYAw6hgDCsYIQtNQwmTD++PVhgC+LrWkZv6urFl6RI2AFb4wvXGc9SDadshN3Ufhi57ZsaAJJ5CNj2biqK00DkzzLcyG0ECIKEJEQKsV1gUgQCmOsqRj3CB0cgDk9FmI8w1o+INJDD9V7bnjoz3BFbkScdOAG8RD/3Et3ZcMZ6i89yZTxe1elhTdwkV4roSIphZRaBjJ5ucTf0ZjCu//7uF5/7eyvLzybM42XhtwY8kA/Zb4yreuaEsdOvNxhhTa3ZvdpfF0WV1okMerUcYIeOxiDPz9s3k3ZUynM9v5m7UnDkKDcvanqYu726D6BX5iEIxVDHMgRnoROnFnrPHmzd6X1qImi6ODUM+Eki/F1t/F9SEnJ+LxoTS/4pBal2NJVtd0Cf6rtzLb1MUEnfgOKSscqCmVuZHN0cmVhbQplbmRvYmoKCjggMCBvYmoKPDwKL1NpemUgOQovUm9vdCAyIDAgUgovSW5mbyAzIDAgUgovRmlsdGVyIC9GbGF0ZURlY29kZQovVHlwZSAvWFJlZgovTGVuZ3RoIDQyCi9XIFsgMSAyIDIgXQovSW5kZXggWyAwIDkgXQo+PgpzdHJlYW0KeJxjYGD4/5+JgZ2BAUQwgggmEMEMIlgYGQQYGBgZPYEEszwDAwBcVAK1CmVuZHN0cmVhbQplbmRvYmoKCnN0YXJ0eHJlZgo3NTkKJSVFT0Y=","mediaType":"application/pdf","requirements":{"generalLiability":{"eachOccurrence":1000000}},"vendorName":"Example Construction LLC","projectName":"Example project"}}}},"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":{"certificate":{"type":"object","properties":{"status":{"type":"string"},"mediaType":{"type":"string"},"extractionConfidence":{"type":"number"},"source":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"},"confidence":{"type":"number"},"line":{"type":"number"},"excerpt":{"type":"string"}},"additionalProperties":true}},"textExcerpt":{"type":"string"},"limitations":{"type":"array","items":{}}},"additionalProperties":true},"comparison":{"type":"object","properties":{"status":{"type":"string"},"findings":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"status":{"type":"string"},"requirement":{"type":"string"},"observed":{"type":"null"}},"additionalProperties":true}},"reviewedBy":{"type":"string"}},"additionalProperties":true},"humanReviewRequired":{"type":"boolean"},"draftEmail":{"type":"object","properties":{"subject":{"type":"string"},"body":{"type":"string"}},"additionalProperties":true}},"additionalProperties":true},"example":{"certificate":{"status":"EXTRACTED","mediaType":"application/pdf","extractionConfidence":0.92,"source":"Uploaded certificate","fields":[{"name":"namedInsured","value":"Example Construction LLC","confidence":0.92,"line":4,"excerpt":"Named Insured: Example Construction LLC"}],"textExcerpt":"Example certificate text","limitations":[]},"comparison":{"status":"WARN","findings":[{"ruleId":"COI-GL-OCC","status":"WARN","requirement":"GL each occurrence","observed":null}],"reviewedBy":"Deterministic contract-to-certificate precheck; human review required"},"humanReviewRequired":true,"draftEmail":{"subject":"Certificate of insurance update needed","body":"Please review the certificate findings."}}}}},"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.10"},"protocols":[{"x402":{}}]}}}},"components":{"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}}}}}}}}