COI Guard
Extract insurance certificate fields from a supplied PDF or image, compare them with contract requirements, and draft follow-up language.
POST
https://brainiac.software/api/v1/coi/analyze$0.10 USDCExtract and check a certificate of insurance
Extract PDF/image fields with confidence, then compare them with contract requirements. Uncertain OCR is WARN and is never treated as verified.
Body
| Field | Required | Notes |
|---|---|---|
fileBase64 | Yes | string |
mediaType | Yes | string; One of: application/pdf, image/png, image/jpeg |
requirements | Yes | object; Object |
vendorName | No | string |
projectName | No | string |
Request exampleJSON
{
"fileBase64": "<base64 document omitted>",
"mediaType": "application/pdf",
"requirements": {
"generalLiability": {
"eachOccurrence": 1000000
}
},
"vendorName": "Example Construction LLC",
"projectName": "Example project"
}The base64 document is shortened here; send the full encoded document.
Response exampleJSON
{
"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."
}
}cURL
curl -i -X POST "https://brainiac.software/api/v1/coi/analyze" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"fileBase64": "<base64 document omitted>",
"mediaType": "application/pdf",
"requirements": {
"generalLiability": {
"eachOccurrence": 1000000
}
},
"vendorName": "Example Construction LLC",
"projectName": "Example project"
}
JSON