# Foundry CSV Keyed Row Reconciliation

> Foundry CSV Keyed Row Reconciliation is a paid API for AI agents from foundry-par007-machine-revenue-mainnet.inference-chip-index.workers.dev, paid per call via x402, $0.015/call, status unknown (last checked 2026-09-14).

Compares two CSV snapshots row-by-row using a key column and reports added, removed, changed, and unchanged records with SHA-256 provenance hashes.

## Facts

- Endpoint: POST https://foundry-par007-machine-revenue-mainnet.inference-chip-index.workers.dev/v2/data/csv-keyed-row-reconciliation
- Price: $0.015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/foundry-csv-keyed-row-reconciliation-05b8ba1a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vmhUSLVuA50NUT5iwkMgf

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 foundry-csv-keyed-row-reconciliation-05b8ba1a -d '<json body>'
```

Example prompt: Compare these two CSV snapshots of our product inventory — the 'before' CSV is from last Monday and the 'after' CSV is from today — using 'product_id' as the key column, and check for changes in the 'price', 'stock', and 'category' columns. Tell me which rows were added, removed, or modified.

## When to prefer this

Choose this endpoint when you need structured, key-based row-level diffing of two CSV snapshots with cryptographic provenance (SHA-256 hashes) and an auditable JSON result — especially in pay-per-request agentic workflows where you need exact evidence of what changed. Prefer it over generic CSV diff tools when provenance timestamps and source hashes matter for audit trails, or when integrating into an x402-compatible payment pipeline.

## Known failure modes

- Missing required fields (after_csv, before_csv, key_column, compare_columns) return a validation error
- CSV content exceeding 12,000 characters per field is rejected
- key_column not found in one or both CSVs causes a reconciliation error
- compare_columns referencing non-existent columns may produce empty diffs or errors
- Malformed CSV (unquoted commas, inconsistent columns) may cause parse errors
- Payment failure or insufficient USDC balance prevents the call from completing

## How this service works

Pay-per-request evidence and data tools: CSV validation and reconciliation, DNS/email configuration evidence, and bounded official weather, earthquake, vehicle, company and study records. Exact USDC prices, explicit JSON contracts and source provenance. No mailbox, ownership, medical or safety guarantees.

## Output

Returns a JSON object with counts of added, removed, changed, and unchanged rows; lists of added and removed record numbers; detailed changed-record entries showing which columns changed and the before/after record positions; SHA-256 hashes of both CSVs for provenance; an observation timestamp; and a flag indicating whether evidence was truncated.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "after_csv": {
   "type": "string",
   "maxLength": 12000,
   "minLength": 1
  },
  "before_csv": {
   "type": "string",
   "maxLength": 12000,
   "minLength": 1
  },
  "key_column": {
   "type": "string",
   "maxLength": 100,
   "minLength": 1
  },
  "compare_columns": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 100,
    "minLength": 1
   },
   "maxItems": 25,
   "minItems": 1
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "route": "csv-keyed-row-reconciliation",
  "result": {
   "after_rows": 2,
   "added_count": 1,
   "before_rows": 2,
   "limitations": [
    "Synthetic example hashes."
   ],
   "after_sha256": "0000000000000000000000000000000000000000000000000000000000000000",
   "before_sha256": "0000000000000000000000000000000000000000000000000000000000000000",
   "changed_count": 1,
   "removed_count": 1,
   "changed_records": [
    {
     "after_record": 2,
     "before_record": 2,
     "changed_columns": [
      "stock"
     ]
    }
   ],
   "unchanged_count": 0,
   "evidence_truncated": false,
   "added_record_numbers": [
    3
   ],
   "removed_record_numbers": [
    3
   ]
  },
  "observed_at": "2026-09-06T00:00:00Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/foundry-csv-keyed-row-reconciliation-05b8ba1a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from foundry-par007-machine-revenue-mainnet.inference-chip-index.workers.dev](https://www.zero.xyz/host/foundry-par007-machine-revenue-mainnet.inference-chip-index.workers.dev/llms.txt)
