# Foundry CSV Ingestion Contract

> Foundry CSV Ingestion Contract 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-15).

Validates, transforms, and reconciles a bounded CSV against a caller-supplied column contract, returning typed row data, issue counts, and provenance hash.

## Facts

- Endpoint: POST https://foundry-par007-machine-revenue-mainnet.inference-chip-index.workers.dev/v2/data/csv-ingestion-contract
- 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/foundry-csv-ingestion-contract-1b56ecc5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-EDBW-JpSSL7BFSnOGXjn

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-ingestion-contract-1b56ecc5 -d '<json body>'
```

Example prompt: Can you validate this CSV against my column contract — map 'Name' (string, not nullable, trim) and 'Score' (integer, not nullable) — and tell me how many rows are clean, any issues found, and give me the input hash? Here's the CSV: Name,Score\nAda,10\nLin,12

## When to prefer this

Choose this endpoint when you need deterministic, contract-driven CSV validation and transformation with explicit JSON output, per-row issue reporting, and cryptographic input provenance (SHA-256) — especially when you need typed coercion (string/number/integer/boolean), null-checking, and column renaming in a single pay-per-request call. Prefer it over generic CSV parsers when you need an auditable, structured result with a clear issue count and source hash, and when the CSV fits within 24,000 characters and 25 columns.

## Known failure modes

- CSV exceeds 24,000 character limit — request rejected
- Column definition missing required fields (source, target, type, nullable, trim) — schema validation error
- More than 25 columns specified — rejected by maxItems constraint
- Malformed CSV that cannot be parsed — issues array populated, status may indicate failure
- Empty CSV string — rejected by minLength constraint
- Type mismatch on a non-nullable column — issues recorded in response

## 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: the transformed row data as an array of typed objects, a list of per-row issues (truncated flag included), overall status (e.g. TRANSFORMED), column names, row count, issue count, SHA-256 hash of the input CSV, and a limitations array noting any synthetic or provenance caveats.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "csv": {
   "type": "string",
   "maxLength": 24000,
   "minLength": 1
  },
  "columns": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "source",
     "target",
     "type",
     "nullable",
     "trim"
    ],
    "properties": {
     "trim": {
      "type": "boolean",
      "default": false
     },
     "type": {
      "enum": [
       "string",
       "number",
       "integer",
       "boolean"
      ],
      "type": "string"
     },
     "source": {
      "type": "string",
      "maxLength": 100,
      "minLength": 1
     },
     "target": {
      "type": "string",
      "maxLength": 100,
      "minLength": 1
     },
     "nullable": {
      "type": "boolean",
      "default": false
     }
    },
    "additionalProperties": false
   },
   "maxItems": 25,
   "minItems": 1
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "route": "csv-ingestion-contract-packet",
  "result": {
   "data": [
    {
     "name": "Ada",
     "points": 10
    },
    {
     "name": "Lin",
     "points": 12
    }
   ],
   "issues": [],
   "status": "TRANSFORMED",
   "columns": [
    "name",
    "points"
   ],
   "row_count": 2,
   "issue_count": 0,
   "limitations": [
    "Synthetic example hash only."
   ],
   "input_sha256": "0000000000000000000000000000000000000000000000000000000000000000",
   "issues_truncated": false
  },
  "observed_at": "2026-09-06T00:00:00Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/foundry-csv-ingestion-contract-1b56ecc5/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)
