{"openapi":"3.1.0","info":{"title":"Data Quality Intelligence API","version":"1.0.0","description":"Profile supplied CSV and JSON tables, point at missing cells and duplicate rows, and propose explicit normalization without changing the source. 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/data-quality/csv-schema-detect":{"post":{"operationId":"detect_a_csv_schema","summary":"Detect a CSV schema","description":"Infer a column type from the supplied CSV or JSON values. A column with more than one non-numeric type stays mixed. No value is rewritten.","tags":["data-quality"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"records":{"maxItems":5000,"type":"array","items":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":80},"additionalProperties":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"csv":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/csv","application/json","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"keyColumns":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}},"additionalProperties":false},"example":{"csv":"id,email,amount,status,joined\n1,Ada@Example.com,10,yes,2024-01-15\n2,ada@example.com, 12,no,2024-02-01\n3,grace@example.com,11,,2024-03-01\n4,bea@example.com,13,yes,2024-04-01\n2,ada@example.com,12,no,2024-02-01\n6,cy@example.com,10,yes,2024-05-01\n7,not-an-email,11,no,03/11/2026\n8,di@example.com,12,yes,2024-06-01\n9,ed@example.com,500,no,2024-07-01\n10,fay@example.com,11,yes,2024-08-01\n11,gus@example.com,12,yes,2024-09-01\n12,hoa@example.com,10,no,2024-10-01\n"}}}},"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":{"checkedAt":{"type":"string"},"recordsDiscarded":{"type":"boolean"},"dataModified":{"type":"boolean"},"outliersConfirmed":{"type":"boolean"},"format":{"type":"string"},"recordsRead":{"type":"number"},"recordsOmitted":{"type":"number"},"columnsOmitted":{"type":"number"},"blankRows":{"type":"number"},"status":{"type":"string"},"rowCount":{"type":"number"},"columnCount":{"type":"number"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"index":{"type":"number"},"type":{"type":"string"},"nullable":{"type":"boolean"},"distinctCount":{"type":"number"},"count":{"type":"number"}},"additionalProperties":true}},"issues":{"type":"array","items":{}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-03T14:00:00.000Z","recordsDiscarded":false,"dataModified":false,"outliersConfirmed":false,"format":"csv","recordsRead":12,"recordsOmitted":0,"columnsOmitted":0,"blankRows":0,"status":"detected","rowCount":12,"columnCount":5,"columns":[{"name":"id","index":1,"type":"integer","nullable":false,"distinctCount":11,"count":12},{"name":"email","index":2,"type":"mixed","nullable":false,"distinctCount":11,"count":12},{"name":"amount","index":3,"type":"integer","nullable":false,"distinctCount":5,"count":12},{"name":"status","index":4,"type":"boolean","nullable":true,"distinctCount":2,"count":11},{"name":"joined","index":5,"type":"mixed","nullable":false,"distinctCount":11,"count":12}],"issues":[],"limitations":["No business system is contacted or updated.","Rows past the 2,000-row limit and columns past the 40-column limit are not read. recordsOmitted and columnsOmitted state how many.","Rows that were read stay in the counts. None of those rows is deleted.","Normalization is a proposal. The original cell is kept beside the proposed value.","A statistical outlier is not a confirmed error.","A date is normalized only when it is already a real YYYY-MM-DD day."]}}}},"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.03"},"protocols":[{"x402":{}}]}}},"/api/v1/data-quality/csv-profile":{"post":{"operationId":"profile_csv_columns","summary":"Profile CSV columns","description":"Count present, missing, and distinct values for each column and report the minimum and maximum of the supplied values.","tags":["data-quality"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"records":{"maxItems":5000,"type":"array","items":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":80},"additionalProperties":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"csv":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/csv","application/json","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"keyColumns":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}},"additionalProperties":false},"example":{"csv":"id,email,amount,status,joined\n1,Ada@Example.com,10,yes,2024-01-15\n2,ada@example.com, 12,no,2024-02-01\n3,grace@example.com,11,,2024-03-01\n4,bea@example.com,13,yes,2024-04-01\n2,ada@example.com,12,no,2024-02-01\n6,cy@example.com,10,yes,2024-05-01\n7,not-an-email,11,no,03/11/2026\n8,di@example.com,12,yes,2024-06-01\n9,ed@example.com,500,no,2024-07-01\n10,fay@example.com,11,yes,2024-08-01\n11,gus@example.com,12,yes,2024-09-01\n12,hoa@example.com,10,no,2024-10-01\n"}}}},"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":{"checkedAt":{"type":"string"},"recordsDiscarded":{"type":"boolean"},"dataModified":{"type":"boolean"},"outliersConfirmed":{"type":"boolean"},"format":{"type":"string"},"recordsRead":{"type":"number"},"recordsOmitted":{"type":"number"},"columnsOmitted":{"type":"number"},"blankRows":{"type":"number"},"status":{"type":"string"},"rowCount":{"type":"number"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"index":{"type":"number"},"type":{"type":"string"},"count":{"type":"number"},"missingCount":{"type":"number"},"distinctCount":{"type":"number"},"min":{"type":"string"},"max":{"type":"string"}},"additionalProperties":true}},"issues":{"type":"array","items":{}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-03T14:00:00.000Z","recordsDiscarded":false,"dataModified":false,"outliersConfirmed":false,"format":"csv","recordsRead":12,"recordsOmitted":0,"columnsOmitted":0,"blankRows":0,"status":"profiled","rowCount":12,"columns":[{"name":"id","index":1,"type":"integer","count":12,"missingCount":0,"distinctCount":11,"min":"1","max":"12"},{"name":"email","index":2,"type":"mixed","count":12,"missingCount":0,"distinctCount":11,"min":"Ada@Example.com","max":"not-an-email"},{"name":"amount","index":3,"type":"integer","count":12,"missingCount":0,"distinctCount":5,"min":"10","max":"500"},{"name":"status","index":4,"type":"boolean","count":11,"missingCount":1,"distinctCount":2,"min":"no","max":"yes"},{"name":"joined","index":5,"type":"mixed","count":12,"missingCount":0,"distinctCount":11,"min":"03/11/2026","max":"2024-10-01"}],"issues":[],"limitations":["No business system is contacted or updated.","Rows past the 2,000-row limit and columns past the 40-column limit are not read. recordsOmitted and columnsOmitted state how many.","Rows that were read stay in the counts. None of those rows is deleted.","Normalization is a proposal. The original cell is kept beside the proposed value.","A statistical outlier is not a confirmed error.","A date is normalized only when it is already a real YYYY-MM-DD day."]}}}},"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.04"},"protocols":[{"x402":{}}]}}},"/api/v1/data-quality/csv-column-type-detect":{"post":{"operationId":"detect_csv_column_types","summary":"Detect CSV column types","description":"List the observed types in each column. A value that differs from the most common type is referenced by row and column and is not changed. A tie is not blamed on a row.","tags":["data-quality"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"records":{"maxItems":5000,"type":"array","items":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":80},"additionalProperties":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"csv":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/csv","application/json","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"keyColumns":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}},"additionalProperties":false},"example":{"csv":"id,email,amount,status,joined\n1,Ada@Example.com,10,yes,2024-01-15\n2,ada@example.com, 12,no,2024-02-01\n3,grace@example.com,11,,2024-03-01\n4,bea@example.com,13,yes,2024-04-01\n2,ada@example.com,12,no,2024-02-01\n6,cy@example.com,10,yes,2024-05-01\n7,not-an-email,11,no,03/11/2026\n8,di@example.com,12,yes,2024-06-01\n9,ed@example.com,500,no,2024-07-01\n10,fay@example.com,11,yes,2024-08-01\n11,gus@example.com,12,yes,2024-09-01\n12,hoa@example.com,10,no,2024-10-01\n"}}}},"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":{"checkedAt":{"type":"string"},"recordsDiscarded":{"type":"boolean"},"dataModified":{"type":"boolean"},"outliersConfirmed":{"type":"boolean"},"format":{"type":"string"},"recordsRead":{"type":"number"},"recordsOmitted":{"type":"number"},"columnsOmitted":{"type":"number"},"blankRows":{"type":"number"},"status":{"type":"string"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"index":{"type":"number"},"type":{"type":"string"},"observed":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"count":{"type":"number"}},"additionalProperties":true}}},"additionalProperties":true}},"issues":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"row":{"type":"number"},"sourceRow":{"type":"number"},"column":{"type":"string"},"columnIndex":{"type":"number"},"value":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-03T14:00:00.000Z","recordsDiscarded":false,"dataModified":false,"outliersConfirmed":false,"format":"csv","recordsRead":12,"recordsOmitted":0,"columnsOmitted":0,"blankRows":0,"status":"detected","columns":[{"name":"id","index":1,"type":"integer","observed":[{"type":"integer","count":12}]},{"name":"email","index":2,"type":"mixed","observed":[{"type":"email","count":11},{"type":"string","count":1}]},{"name":"amount","index":3,"type":"integer","observed":[{"type":"integer","count":12}]},{"name":"status","index":4,"type":"boolean","observed":[{"type":"boolean","count":11}]},{"name":"joined","index":5,"type":"mixed","observed":[{"type":"date","count":11},{"type":"string","count":1}]}],"issues":[{"kind":"conflict","code":"inconsistent_format","row":7,"sourceRow":8,"column":"email","columnIndex":2,"value":"not-an-email","detail":"The most common type is email. This value was not changed."},{"kind":"conflict","code":"inconsistent_format","row":7,"sourceRow":8,"column":"joined","columnIndex":5,"value":"03/11/2026","detail":"The most common type is date. This value was not changed."}],"limitations":["No business system is contacted or updated.","Rows past the 2,000-row limit and columns past the 40-column limit are not read. recordsOmitted and columnsOmitted state how many.","Rows that were read stay in the counts. None of those rows is deleted.","Normalization is a proposal. The original cell is kept beside the proposed value.","A statistical outlier is not a confirmed error.","A date is normalized only when it is already a real YYYY-MM-DD day."]}}}},"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.04"},"protocols":[{"x402":{}}]}}},"/api/v1/data-quality/csv-missing-value-audit":{"post":{"operationId":"audit_missing_csv_values","summary":"Audit missing CSV values","description":"Find empty or whitespace-only cells and give each one a row and column reference. The row stays in the table.","tags":["data-quality"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"records":{"maxItems":5000,"type":"array","items":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":80},"additionalProperties":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"csv":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/csv","application/json","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"keyColumns":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}},"additionalProperties":false},"example":{"csv":"id,email,amount,status,joined\n1,Ada@Example.com,10,yes,2024-01-15\n2,ada@example.com, 12,no,2024-02-01\n3,grace@example.com,11,,2024-03-01\n4,bea@example.com,13,yes,2024-04-01\n2,ada@example.com,12,no,2024-02-01\n6,cy@example.com,10,yes,2024-05-01\n7,not-an-email,11,no,03/11/2026\n8,di@example.com,12,yes,2024-06-01\n9,ed@example.com,500,no,2024-07-01\n10,fay@example.com,11,yes,2024-08-01\n11,gus@example.com,12,yes,2024-09-01\n12,hoa@example.com,10,no,2024-10-01\n"}}}},"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":{"checkedAt":{"type":"string"},"recordsDiscarded":{"type":"boolean"},"dataModified":{"type":"boolean"},"outliersConfirmed":{"type":"boolean"},"format":{"type":"string"},"recordsRead":{"type":"number"},"recordsOmitted":{"type":"number"},"columnsOmitted":{"type":"number"},"blankRows":{"type":"number"},"status":{"type":"string"},"missingCount":{"type":"number"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"index":{"type":"number"},"missingCount":{"type":"number"},"missingRate":{"type":"number"}},"additionalProperties":true}},"issues":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"row":{"type":"number"},"sourceRow":{"type":"number"},"column":{"type":"string"},"columnIndex":{"type":"number"},"value":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-03T14:00:00.000Z","recordsDiscarded":false,"dataModified":false,"outliersConfirmed":false,"format":"csv","recordsRead":12,"recordsOmitted":0,"columnsOmitted":0,"blankRows":0,"status":"checked","missingCount":1,"columns":[{"name":"id","index":1,"missingCount":0,"missingRate":0},{"name":"email","index":2,"missingCount":0,"missingRate":0},{"name":"amount","index":3,"missingCount":0,"missingRate":0},{"name":"status","index":4,"missingCount":1,"missingRate":0.0833},{"name":"joined","index":5,"missingCount":0,"missingRate":0}],"issues":[{"kind":"missing","code":"missing_value","row":3,"sourceRow":4,"column":"status","columnIndex":4,"value":"","detail":"This cell is empty or whitespace. The row was kept."}],"limitations":["No business system is contacted or updated.","Rows past the 2,000-row limit and columns past the 40-column limit are not read. recordsOmitted and columnsOmitted state how many.","Rows that were read stay in the counts. None of those rows is deleted.","Normalization is a proposal. The original cell is kept beside the proposed value.","A statistical outlier is not a confirmed error.","A date is normalized only when it is already a real YYYY-MM-DD day."]}}}},"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.03"},"protocols":[{"x402":{}}]}}},"/api/v1/data-quality/csv-duplicate-row-detect":{"post":{"operationId":"detect_duplicate_csv_rows","summary":"Detect duplicate CSV rows","description":"Group records that match after trimming each compared cell. When key columns are supplied, only those columns are compared. No record is removed.","tags":["data-quality"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"records":{"maxItems":5000,"type":"array","items":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":80},"additionalProperties":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"csv":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/csv","application/json","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"keyColumns":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}},"additionalProperties":false},"example":{"csv":"id,email,amount,status,joined\n1,Ada@Example.com,10,yes,2024-01-15\n2,ada@example.com, 12,no,2024-02-01\n3,grace@example.com,11,,2024-03-01\n4,bea@example.com,13,yes,2024-04-01\n2,ada@example.com,12,no,2024-02-01\n6,cy@example.com,10,yes,2024-05-01\n7,not-an-email,11,no,03/11/2026\n8,di@example.com,12,yes,2024-06-01\n9,ed@example.com,500,no,2024-07-01\n10,fay@example.com,11,yes,2024-08-01\n11,gus@example.com,12,yes,2024-09-01\n12,hoa@example.com,10,no,2024-10-01\n"}}}},"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":{"checkedAt":{"type":"string"},"recordsDiscarded":{"type":"boolean"},"dataModified":{"type":"boolean"},"outliersConfirmed":{"type":"boolean"},"format":{"type":"string"},"recordsRead":{"type":"number"},"recordsOmitted":{"type":"number"},"columnsOmitted":{"type":"number"},"blankRows":{"type":"number"},"status":{"type":"string"},"groupCount":{"type":"number"},"groups":{"type":"array","items":{"type":"object","properties":{"count":{"type":"number"},"rows":{"type":"array","items":{"type":"object","properties":{"row":{"type":"number"},"sourceRow":{"type":"number"}},"additionalProperties":true}}},"additionalProperties":true}},"issues":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"row":{"type":"number"},"sourceRow":{"type":"number"},"column":{"type":"string"},"columnIndex":{"type":"number"},"value":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-03T14:00:00.000Z","recordsDiscarded":false,"dataModified":false,"outliersConfirmed":false,"format":"csv","recordsRead":12,"recordsOmitted":0,"columnsOmitted":0,"blankRows":0,"status":"checked","groupCount":1,"groups":[{"count":2,"rows":[{"row":2,"sourceRow":3},{"row":5,"sourceRow":6}]}],"issues":[{"kind":"conflict","code":"duplicate_row","row":5,"sourceRow":6,"column":"","columnIndex":0,"value":"","detail":"This record matches record 2 after trimming the compared cells. No record was removed."}],"limitations":["No business system is contacted or updated.","Rows past the 2,000-row limit and columns past the 40-column limit are not read. recordsOmitted and columnsOmitted state how many.","Rows that were read stay in the counts. None of those rows is deleted.","Normalization is a proposal. The original cell is kept beside the proposed value.","A statistical outlier is not a confirmed error.","A date is normalized only when it is already a real YYYY-MM-DD day."]}}}},"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.05"},"protocols":[{"x402":{}}]}}},"/api/v1/data-quality/csv-outlier-detect":{"post":{"operationId":"detect_statistical_outliers","summary":"Detect statistical outliers","description":"Flag numeric values outside a Tukey fence of 1.5 times the interquartile range when a column has at least eight numbers. Each flag is a possible outlier, not a confirmed error.","tags":["data-quality"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"records":{"maxItems":5000,"type":"array","items":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":80},"additionalProperties":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"csv":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/csv","application/json","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"keyColumns":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}},"additionalProperties":false},"example":{"csv":"id,email,amount,status,joined\n1,Ada@Example.com,10,yes,2024-01-15\n2,ada@example.com, 12,no,2024-02-01\n3,grace@example.com,11,,2024-03-01\n4,bea@example.com,13,yes,2024-04-01\n2,ada@example.com,12,no,2024-02-01\n6,cy@example.com,10,yes,2024-05-01\n7,not-an-email,11,no,03/11/2026\n8,di@example.com,12,yes,2024-06-01\n9,ed@example.com,500,no,2024-07-01\n10,fay@example.com,11,yes,2024-08-01\n11,gus@example.com,12,yes,2024-09-01\n12,hoa@example.com,10,no,2024-10-01\n"}}}},"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":{"checkedAt":{"type":"string"},"recordsDiscarded":{"type":"boolean"},"dataModified":{"type":"boolean"},"outliersConfirmed":{"type":"boolean"},"format":{"type":"string"},"recordsRead":{"type":"number"},"recordsOmitted":{"type":"number"},"columnsOmitted":{"type":"number"},"blankRows":{"type":"number"},"status":{"type":"string"},"outlierCount":{"type":"number"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"index":{"type":"number"},"status":{"type":"string"},"count":{"type":"number"},"lower":{"type":"string"},"upper":{"type":"string"}},"additionalProperties":true}},"outliers":{"type":"array","items":{"type":"object","properties":{"row":{"type":"number"},"sourceRow":{"type":"number"},"column":{"type":"string"},"columnIndex":{"type":"number"},"value":{"type":"string"},"rule":{"type":"string"},"confirmed":{"type":"boolean"},"detail":{"type":"string"}},"additionalProperties":true}},"issues":{"type":"array","items":{}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-03T14:00:00.000Z","recordsDiscarded":false,"dataModified":false,"outliersConfirmed":false,"format":"csv","recordsRead":12,"recordsOmitted":0,"columnsOmitted":0,"blankRows":0,"status":"checked","outlierCount":1,"columns":[{"name":"id","index":1,"status":"checked","count":12,"lower":"-7","upper":"19"},{"name":"email","index":2,"status":"not_checked","count":0,"lower":"","upper":""},{"name":"amount","index":3,"status":"checked","count":12,"lower":"8.875","upper":"13.875"},{"name":"status","index":4,"status":"not_checked","count":0,"lower":"","upper":""},{"name":"joined","index":5,"status":"not_checked","count":0,"lower":"","upper":""}],"outliers":[{"row":9,"sourceRow":10,"column":"amount","columnIndex":3,"value":"500","rule":"tukey_1_5_iqr","confirmed":false,"detail":"The value is outside the Tukey fence 8.875 to 13.875. This is a statistical outlier, not a confirmed error."}],"issues":[],"limitations":["No business system is contacted or updated.","Rows past the 2,000-row limit and columns past the 40-column limit are not read. recordsOmitted and columnsOmitted state how many.","Rows that were read stay in the counts. None of those rows is deleted.","Normalization is a proposal. The original cell is kept beside the proposed value.","A statistical outlier is not a confirmed error.","A date is normalized only when it is already a real YYYY-MM-DD day."]}}}},"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.05"},"protocols":[{"x402":{}}]}}},"/api/v1/data-quality/csv-normalize":{"post":{"operationId":"propose_csv_normalization","summary":"Propose CSV normalization","description":"Propose trim, email lowercase, boolean tokens, and unambiguous thousands separators. Each change names its rule and keeps the original cell. Dates that are not already YYYY-MM-DD are not rewritten.","tags":["data-quality"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"records":{"maxItems":5000,"type":"array","items":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":80},"additionalProperties":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"csv":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/csv","application/json","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"keyColumns":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}},"additionalProperties":false},"example":{"csv":"id,email,amount,status,joined\n1,Ada@Example.com,10,yes,2024-01-15\n2,ada@example.com, 12,no,2024-02-01\n3,grace@example.com,11,,2024-03-01\n4,bea@example.com,13,yes,2024-04-01\n2,ada@example.com,12,no,2024-02-01\n6,cy@example.com,10,yes,2024-05-01\n7,not-an-email,11,no,03/11/2026\n8,di@example.com,12,yes,2024-06-01\n9,ed@example.com,500,no,2024-07-01\n10,fay@example.com,11,yes,2024-08-01\n11,gus@example.com,12,yes,2024-09-01\n12,hoa@example.com,10,no,2024-10-01\n"}}}},"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":{"checkedAt":{"type":"string"},"recordsDiscarded":{"type":"boolean"},"dataModified":{"type":"boolean"},"outliersConfirmed":{"type":"boolean"},"format":{"type":"string"},"recordsRead":{"type":"number"},"recordsOmitted":{"type":"number"},"columnsOmitted":{"type":"number"},"blankRows":{"type":"number"},"status":{"type":"string"},"rowCount":{"type":"number"},"changedCount":{"type":"number"},"unchangedCount":{"type":"number"},"changes":{"type":"array","items":{"type":"object","properties":{"row":{"type":"number"},"sourceRow":{"type":"number"},"column":{"type":"string"},"columnIndex":{"type":"number"},"original":{"type":"string"},"normalized":{"type":"string"},"rule":{"type":"string"}},"additionalProperties":true}},"issues":{"type":"array","items":{}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-03T14:00:00.000Z","recordsDiscarded":false,"dataModified":false,"outliersConfirmed":false,"format":"csv","recordsRead":12,"recordsOmitted":0,"columnsOmitted":0,"blankRows":0,"status":"proposed","rowCount":12,"changedCount":13,"unchangedCount":1,"changes":[{"row":1,"sourceRow":2,"column":"email","columnIndex":2,"original":"Ada@Example.com","normalized":"ada@example.com","rule":"email_lower"},{"row":1,"sourceRow":2,"column":"status","columnIndex":4,"original":"yes","normalized":"true","rule":"boolean_token"},{"row":2,"sourceRow":3,"column":"amount","columnIndex":3,"original":" 12","normalized":"12","rule":"trim"},{"row":2,"sourceRow":3,"column":"status","columnIndex":4,"original":"no","normalized":"false","rule":"boolean_token"},{"row":4,"sourceRow":5,"column":"status","columnIndex":4,"original":"yes","normalized":"true","rule":"boolean_token"},{"row":5,"sourceRow":6,"column":"status","columnIndex":4,"original":"no","normalized":"false","rule":"boolean_token"},{"row":6,"sourceRow":7,"column":"status","columnIndex":4,"original":"yes","normalized":"true","rule":"boolean_token"},{"row":7,"sourceRow":8,"column":"status","columnIndex":4,"original":"no","normalized":"false","rule":"boolean_token"},{"row":8,"sourceRow":9,"column":"status","columnIndex":4,"original":"yes","normalized":"true","rule":"boolean_token"},{"row":9,"sourceRow":10,"column":"status","columnIndex":4,"original":"no","normalized":"false","rule":"boolean_token"},{"row":10,"sourceRow":11,"column":"status","columnIndex":4,"original":"yes","normalized":"true","rule":"boolean_token"},{"row":11,"sourceRow":12,"column":"status","columnIndex":4,"original":"yes","normalized":"true","rule":"boolean_token"},{"row":12,"sourceRow":13,"column":"status","columnIndex":4,"original":"no","normalized":"false","rule":"boolean_token"}],"issues":[],"limitations":["No business system is contacted or updated.","Rows past the 2,000-row limit and columns past the 40-column limit are not read. recordsOmitted and columnsOmitted state how many.","Rows that were read stay in the counts. None of those rows is deleted.","Normalization is a proposal. The original cell is kept beside the proposed value.","A statistical outlier is not a confirmed error.","A date is normalized only when it is already a real YYYY-MM-DD day."]}}}},"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.04"},"protocols":[{"x402":{}}]}}},"/api/v1/data-quality/csv-report":{"post":{"operationId":"report_csv_quality","summary":"Report CSV quality","description":"Combine the schema, profile, missing cells, duplicate groups, possible outliers, and proposed normalization for one supplied table. No record is removed and no outlier is confirmed.","tags":["data-quality"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"records":{"maxItems":5000,"type":"array","items":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":80},"additionalProperties":{"anyOf":[{"type":"string","maxLength":4000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"csv":{"type":"string","maxLength":200000},"json":{"type":"string","maxLength":200000},"file":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"mediaType":{"type":"string","enum":["text/csv","application/json","text/plain"]},"fileBase64":{"type":"string","minLength":1,"maxLength":12000000}},"required":["mediaType","fileBase64"],"additionalProperties":false},"keyColumns":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}},"additionalProperties":false},"example":{"csv":"id,email,amount,status,joined\n1,Ada@Example.com,10,yes,2024-01-15\n2,ada@example.com, 12,no,2024-02-01\n3,grace@example.com,11,,2024-03-01\n4,bea@example.com,13,yes,2024-04-01\n2,ada@example.com,12,no,2024-02-01\n6,cy@example.com,10,yes,2024-05-01\n7,not-an-email,11,no,03/11/2026\n8,di@example.com,12,yes,2024-06-01\n9,ed@example.com,500,no,2024-07-01\n10,fay@example.com,11,yes,2024-08-01\n11,gus@example.com,12,yes,2024-09-01\n12,hoa@example.com,10,no,2024-10-01\n"}}}},"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":{"checkedAt":{"type":"string"},"recordsDiscarded":{"type":"boolean"},"dataModified":{"type":"boolean"},"outliersConfirmed":{"type":"boolean"},"format":{"type":"string"},"recordsRead":{"type":"number"},"recordsOmitted":{"type":"number"},"columnsOmitted":{"type":"number"},"blankRows":{"type":"number"},"status":{"type":"string"},"rowCount":{"type":"number"},"columnCount":{"type":"number"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"index":{"type":"number"},"type":{"type":"string"},"nullable":{"type":"boolean"},"count":{"type":"number"},"missingCount":{"type":"number"},"distinctCount":{"type":"number"},"min":{"type":"string"},"max":{"type":"string"}},"additionalProperties":true}},"groups":{"type":"array","items":{"type":"object","properties":{"count":{"type":"number"},"rows":{"type":"array","items":{"type":"object","properties":{"row":{"type":"number"},"sourceRow":{"type":"number"}},"additionalProperties":true}}},"additionalProperties":true}},"outlierCount":{"type":"number"},"outliers":{"type":"array","items":{"type":"object","properties":{"row":{"type":"number"},"sourceRow":{"type":"number"},"column":{"type":"string"},"columnIndex":{"type":"number"},"value":{"type":"string"},"rule":{"type":"string"},"confirmed":{"type":"boolean"},"detail":{"type":"string"}},"additionalProperties":true}},"changes":{"type":"array","items":{"type":"object","properties":{"row":{"type":"number"},"sourceRow":{"type":"number"},"column":{"type":"string"},"columnIndex":{"type":"number"},"original":{"type":"string"},"normalized":{"type":"string"},"rule":{"type":"string"}},"additionalProperties":true}},"issues":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"code":{"type":"string"},"row":{"type":"number"},"sourceRow":{"type":"number"},"column":{"type":"string"},"columnIndex":{"type":"number"},"value":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"checkedAt":"2026-11-03T14:00:00.000Z","recordsDiscarded":false,"dataModified":false,"outliersConfirmed":false,"format":"csv","recordsRead":12,"recordsOmitted":0,"columnsOmitted":0,"blankRows":0,"status":"checked","rowCount":12,"columnCount":5,"columns":[{"name":"id","index":1,"type":"integer","nullable":false,"count":12,"missingCount":0,"distinctCount":11,"min":"1","max":"12"},{"name":"email","index":2,"type":"mixed","nullable":false,"count":12,"missingCount":0,"distinctCount":11,"min":"Ada@Example.com","max":"not-an-email"},{"name":"amount","index":3,"type":"integer","nullable":false,"count":12,"missingCount":0,"distinctCount":5,"min":"10","max":"500"},{"name":"status","index":4,"type":"boolean","nullable":true,"count":11,"missingCount":1,"distinctCount":2,"min":"no","max":"yes"},{"name":"joined","index":5,"type":"mixed","nullable":false,"count":12,"missingCount":0,"distinctCount":11,"min":"03/11/2026","max":"2024-10-01"}],"groups":[{"count":2,"rows":[{"row":2,"sourceRow":3},{"row":5,"sourceRow":6}]}],"outlierCount":1,"outliers":[{"row":9,"sourceRow":10,"column":"amount","columnIndex":3,"value":"500","rule":"tukey_1_5_iqr","confirmed":false,"detail":"The value is outside the Tukey fence 8.875 to 13.875. This is a statistical outlier, not a confirmed error."}],"changes":[{"row":1,"sourceRow":2,"column":"email","columnIndex":2,"original":"Ada@Example.com","normalized":"ada@example.com","rule":"email_lower"},{"row":1,"sourceRow":2,"column":"status","columnIndex":4,"original":"yes","normalized":"true","rule":"boolean_token"},{"row":2,"sourceRow":3,"column":"amount","columnIndex":3,"original":" 12","normalized":"12","rule":"trim"},{"row":2,"sourceRow":3,"column":"status","columnIndex":4,"original":"no","normalized":"false","rule":"boolean_token"},{"row":4,"sourceRow":5,"column":"status","columnIndex":4,"original":"yes","normalized":"true","rule":"boolean_token"},{"row":5,"sourceRow":6,"column":"status","columnIndex":4,"original":"no","normalized":"false","rule":"boolean_token"},{"row":6,"sourceRow":7,"column":"status","columnIndex":4,"original":"yes","normalized":"true","rule":"boolean_token"},{"row":7,"sourceRow":8,"column":"status","columnIndex":4,"original":"no","normalized":"false","rule":"boolean_token"},{"row":8,"sourceRow":9,"column":"status","columnIndex":4,"original":"yes","normalized":"true","rule":"boolean_token"},{"row":9,"sourceRow":10,"column":"status","columnIndex":4,"original":"no","normalized":"false","rule":"boolean_token"},{"row":10,"sourceRow":11,"column":"status","columnIndex":4,"original":"yes","normalized":"true","rule":"boolean_token"},{"row":11,"sourceRow":12,"column":"status","columnIndex":4,"original":"yes","normalized":"true","rule":"boolean_token"},{"row":12,"sourceRow":13,"column":"status","columnIndex":4,"original":"no","normalized":"false","rule":"boolean_token"}],"issues":[{"kind":"conflict","code":"inconsistent_format","row":7,"sourceRow":8,"column":"email","columnIndex":2,"value":"not-an-email","detail":"The most common type is email. This value was not changed."},{"kind":"conflict","code":"inconsistent_format","row":7,"sourceRow":8,"column":"joined","columnIndex":5,"value":"03/11/2026","detail":"The most common type is date. This value was not changed."},{"kind":"missing","code":"missing_value","row":3,"sourceRow":4,"column":"status","columnIndex":4,"value":"","detail":"This cell is empty or whitespace. The row was kept."},{"kind":"conflict","code":"duplicate_row","row":5,"sourceRow":6,"column":"","columnIndex":0,"value":"","detail":"This record matches record 2 after trimming the compared cells. No record was removed."}],"limitations":["No business system is contacted or updated.","Rows past the 2,000-row limit and columns past the 40-column limit are not read. recordsOmitted and columnsOmitted state how many.","Rows that were read stay in the counts. None of those rows is deleted.","Normalization is a proposal. The original cell is kept beside the proposed value.","A statistical outlier is not a confirmed error.","A date is normalized only when it is already a real YYYY-MM-DD day."]}}}},"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.12"},"protocols":[{"x402":{}}]}}}},"components":{"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}}}}}}}}