# Tabular Contract Audit

> Tabular Contract Audit is a paid API for AI agents from api.zfinia.com, paid per call via x402, $0.12/call, status unknown (last checked 2026-10-19).

Validates delimited (CSV/TSV) data against a declared column contract in one pass, returning a single pass/fail verdict plus the exact row and clause of every breach.

## Facts

- Endpoint: POST https://api.zfinia.com/x402/v1/tabular-contract-audit?utm_source=zero.xyz
- Price: $0.12/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tabular-contract-audit-97b50474
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NSrlz1n46ziT_-ct5Ypey

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability tabular-contract-audit-97b50474 -d '<json body>'
```

Example prompt: Audit this CSV against my contract — column 'user_id' must be a unique integer and required, 'email' must match pattern '^[^@]+@[^@]+$' and be required, 'status' must be one of ['active','inactive'], and 'score' must be a number between 0 and 100 with max null rate 0.1. Use comma as delimiter and tell me every row and clause that fails.

## When to prefer this

Choose this endpoint when you need a single-pass, row-level audit of delimited data against a fully declared contract and want pinpoint breach locations (row + clause) rather than a summary report. It is ideal for pre-ingestion gates, supplier data validation, ETL quality checks, and compliance audits where you supply the data inline (no remote fetch) and need deterministic pass/fail semantics. Prefer it over generic schema validators when you need composite primary key checks, null-rate ceilings, encoding damage detection, and header drift detection all in one call.

## Known failure modes

- CSV string exceeds 262144 character limit — audit reports incomplete rather than passing
- Contract references column names not found in the CSV header — header drift clause triggered
- Invalid regex pattern in contract causes pattern clause to error
- Delimiter mismatch between declared delimiter and actual file format leads to single-column parse
- Contract has more than 64 columns — rejected at input validation
- Malformed CSV (unescaped quotes, inconsistent column counts) may cause row-level parse errors
- Missing required 'columns' array in contract object — request rejected
- Primary key array references column names not in the contract — clause error

## How this service works

Audit your own delimited data against a contract you declare, and get one pass/fail plus the exact row and clause of every breach. Checks types, required values, enums, numeric bounds, lengths, patterns, uniqueness, composite primary keys, null-rate ceilings, header drift and encoding damage in one pass. A pass means the audit was complete and nothing broke, so a file beyond the bounds reports incomplete rather than passing. Nothing is fetched: you supply the rows.

## Output

A single pass/fail verdict for the entire audit, plus a structured list of every breach with the exact row number and the specific contract clause that was violated. If the data exceeds processing bounds, the result is marked incomplete rather than passing. The response covers type mismatches, missing required values, enum violations, numeric out-of-bounds, length overflows, pattern failures, uniqueness/primary-key duplicates, null-rate ceiling breaches, unexpected or missing headers, and encoding damage — all in one pass.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "csv": {
   "type": "string",
   "maxLength": 262144
  },
  "contract": {
   "type": "object",
   "required": [
    "columns"
   ],
   "properties": {
    "columns": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "name"
      ],
      "properties": {
       "max": {
        "type": "number"
       },
       "min": {
        "type": "number"
       },
       "enum": {
        "type": "array",
        "items": {
         "type": "string"
        },
        "maxItems": 100
       },
       "name": {
        "type": "string"
       },
       "type": {
        "enum": [
         "string",
         "integer",
         "number",
         "boolean",
         "date",
         "datetime"
        ],
        "type": "string"
       },
       "unique": {
        "type": "boolean"
       },
       "pattern": {
        "type": "string",
        "maxLength": 200
       },
       "required": {
        "type": "boolean"
       },
       "max_length": {
        "type": "integer",
        "minimum": 1
       },
       "max_null_rate": {
        "type": "number",
        "maximum": 1,
        "minimum": 0
       }
      },
      "additionalProperties": false
     },
     "maxItems": 64,
     "minItems": 1
    },
    "primary_key": {
     "type": "array",
     "items": {
      "type": "string"
     },
     "minItems": 1
    },
    "allow_extra_columns": {
     "type": "boolean"
    },
    "require_column_order": {
     "type": "boolean"
    }
   },
   "additionalProperties": false
  },
  "delimiter": {
   "type": "string",
   "maxLength": 1,
   "minLength": 1
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tabular-contract-audit-97b50474/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.zfinia.com](https://www.zero.xyz/host/api.zfinia.com/llms.txt)
