# CSV Drift Evidence

> CSV Drift Evidence is a paid API for AI agents from foundry-csv-drift-evidence-mainnet.inference-chip-index.workers.dev, paid per call via x402, $0.015/call, status unknown (last checked 2026-09-15).

Compares a candidate CSV against a baseline CSV and returns deterministic structural drift evidence including column, type, and missing-rate changes.

## Facts

- Endpoint: POST https://foundry-csv-drift-evidence-mainnet.inference-chip-index.workers.dev/v1/csv/drift
- Price: $0.015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/csv-drift-evidence-b7bdb66f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9bKnsfPOaWvVMrkvZOhTT

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 csv-drift-evidence-b7bdb66f -d '<json body>'
```

Example prompt: Compare this week's export CSV against last week's known-good baseline and flag any structural drift — especially check the 'price' and 'quantity' columns for numeric range changes and treat 'new_promo_id' as an allowed new column.

## When to prefer this

Choose this endpoint when you need deterministic, reproducible structural drift detection between two CSV snapshots — particularly for data pipeline validation, ETL monitoring, or pre-ingestion checks. It is ideal when you want explicit, auditable evidence of schema changes rather than statistical or ML-based drift scores. Prefer it over general data profiling tools when the focus is on column-level structure, missing rates, and numeric range adherence against a known-good baseline.

## Known failure modes

- Malformed or empty CSV strings cause validation errors
- CSV exceeding 250,000 characters is rejected
- Column names in numericRangeColumns not present in baseline return warnings or are skipped
- Mismatched encodings or line endings may cause parsing failures
- Extremely wide CSVs with hundreds of columns may hit item limits on allowedNewColumns or numericRangeColumns

## How this service works

Deterministically compares a candidate CSV with a known-good baseline and returns compact schema, missingness, type, order, and numeric-range drift evidence. Results are decision support, not a guarantee of downstream safety.

## Output

Returns deterministic structural drift evidence including: lists of added, removed, or renamed columns; type changes per column; missing-rate deltas that exceed the configured review threshold; and numeric range violations for specified columns compared to the baseline.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "baselineCsv": {
   "type": "string",
   "maxLength": 250000,
   "minLength": 1,
   "description": "Known-good CSV including one header row."
  },
  "candidateCsv": {
   "type": "string",
   "maxLength": 250000,
   "minLength": 1,
   "description": "Candidate CSV to compare with the baseline."
  },
  "allowedNewColumns": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 256,
    "minLength": 1
   },
   "maxItems": 200,
   "description": "New candidate columns that should not reduce the score.",
   "uniqueItems": true
  },
  "numericRangeColumns": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 256,
    "minLength": 1
   },
   "maxItems": 200,
   "description": "Baseline numeric columns whose observed range should be checked.",
   "uniqueItems": true
  },
  "missingRateReviewDelta": {
   "type": "number",
   "default": 0.1,
   "maximum": 1,
   "minimum": 0,
   "description": "Absolute missing-rate change that is reported for review."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "score": 88,
  "product": "csv-drift-evidence",
  "version": "1.0.0",
  "disposition": "REVIEW",
  "typeChanges": [],
  "addedColumns": [
   "source"
  ],
  "baselineRows": 2,
  "candidateRows": 2,
  "removedColumns": [],
  "reorderedColumns": false,
  "missingRateChanges": [
   {
    "delta": 0.5,
    "column": "region",
    "baseline": 0,
    "candidate": 0.5
   }
  ],
  "evidenceFingerprint": "15a1c350fa3d73358e9e0d846942c90e31a8923cbf6f41bcb2c10030505357a3",
  "disallowedAddedColumns": [],
  "numericRangeExcursions": [
   {
    "above": 1,
    "below": 0,
    "column": "score",
    "baselineMaximum": 0.9,
    "baselineMinimum": 0.7
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/csv-drift-evidence-b7bdb66f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from foundry-csv-drift-evidence-mainnet.inference-chip-index.workers.dev](https://www.zero.xyz/host/foundry-csv-drift-evidence-mainnet.inference-chip-index.workers.dev/llms.txt)
