# Mekler AI CSV Data Validator

> Mekler AI CSV Data Validator is a paid API for AI agents from api.mekler.ai, paid per call via x402, $0.05/call, status unknown (last checked 2026-10-10).

Validates a CSV file against a fixed JSON column specification, checking types, required fields, uniqueness, allowed values, and numeric/row-count bounds, returning pass/fail with row/column error codes.

## Facts

- Endpoint: POST https://api.mekler.ai/v1/data/csv/validate-data?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mekler-ai-csv-data-validator-2bb5f592
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_k0Nt--_fv6RFwYwAXNYub

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 mekler-ai-csv-data-validator-2bb5f592 -d '<json body>'
```

Example prompt: Before I import this CSV into the database, validate it against these column rules: id must be a unique integer and required, name must be a required string, amount must be a decimal between 0 and 10000, and status must be one of 'active' or 'inactive' — tell me exactly which rows and columns fail.

## When to prefer this

Choose this endpoint when you need a fast, deterministic, schema-driven gate before importing or processing CSV data — especially when you have a fixed column specification with known types, required fields, uniqueness constraints, or allowed value sets. It is ideal for ETL pipelines, form submission processing, and data handoff validation where you want row-level error codes without modifying the data. Do not use it for cross-column rules, formula evaluation, fact-checking, data repair, or fuzzy/semantic validation.

## Known failure modes

- CSV exceeds 2,000 rows — request rejected
- More than 50 columns in spec or CSV — request rejected
- Payload exceeds 256 KiB — request rejected
- Column named in spec is missing from CSV header — returns column-level error
- Extra columns in CSV when allow_extra_columns is false — validation failure
- Invalid spec JSON structure — malformed request error
- Only first 50 failures returned if more exist (failures_truncated: true)
- Non-UTF-8 CSV encoding causes parse failure

## How this service works

Validate CSV before import using a fixed JSON column specification. Checks missing/extra columns, required cells, string/integer/decimal/boolean/date types, uniqueness, allowed values and numeric/row-count bounds. Returns pass/fail with row/column error codes. POST JSON with csv and spec.columns; schemas/examples attached. Full contract: /openapi.json. Max 2,000 rows, 50 columns, 256 KiB; first 50 failures. No formulas, cross-column rules, fact checking or data repair.

## Output

Returns a JSON object with a 'verdict' of 'pass' or 'fail', a list of up to 50 failures each containing the row number, column name, and error code (e.g. 'unique', 'min', 'required', 'type'), the total number of rows checked, failure count, whether failures were truncated, a SHA256 receipt, and a boundary disclaimer about the scope of validation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "csv": {
   "type": "string",
   "description": "UTF-8 comma-delimited CSV with header. No trimming. Data record numbers start at 1; quoted newlines are one record."
  },
  "spec": {
   "type": "object",
   "required": [
    "columns"
   ],
   "properties": {
    "columns": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "name",
       "type"
      ],
      "properties": {
       "max": {
        "oneOf": [
         {
          "type": "number"
         },
         {
          "type": "string"
         }
        ],
        "description": "Inclusive numeric bound; allowed only for integer or decimal columns."
       },
       "min": {
        "oneOf": [
         {
          "type": "number"
         },
         {
          "type": "string"
         }
        ],
        "description": "Inclusive numeric bound; allowed only for integer or decimal columns."
       },
       "enum": {
        "type": "array",
        "items": {
         "type": "string",
         "maxLength": 1000
        },
        "maxItems": 100,
        "minItems": 1,
        "description": "Exact allowed cell strings, compared without trimming or normalization."
       },
       "name": {
        "type": "string",
        "maxLength": 100,
        "minLength": 1
       },
       "type": {
        "enum": [
         "string",
         "integer",
         "decimal",
         "boolean",
         "date"
        ],
        "type": "string",
        "description": "string: literal text; integer: base-10, no plus sign or leading zeros; decimal: plain decimal, no exponent; boolean: lowercase true/false; date: valid YYYY-MM-DD."
       },
       "unique": {
        "type": "boolean",
        "default": false,
        "description": "Reject repeated nonempty values within this column; numeric values compare numerically."
       },
       "required": {
        "type": "boolean",
        "default": false,
        "description": "Reject empty cells. Whitespace is not trimmed."
       }
      },
      "additionalProperties": false
     },
     "maxItems": 50,
     "minItems": 1,
     "description": "Fixed built-in checks. Every named column must exist, even when required is false."
    },
    "max_rows": {
     "type": "integer",
     "default": 2000,
     "maximum": 2000,
     "minimum": 0
    },
    "min_rows": {
     "type": "integer",
     "default": 0,
     "maximum": 2000,
     "minimum": 0
    },
    "allow_extra_c
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "verdict": "fail",
  "boundary": "Only supplied explicit criteria checked; no certification of truth or subjective quality.",
  "failures": [
   {
    "row": 2,
    "code": "unique",
    "column": "id"
   },
   {
    "row": 2,
    "code": "min",
    "column": "amount"
   }
  ],
  "rows_checked": 2,
  "failure_count": 2,
  "receipt_sha256": "32265ae46050fa0067b9adb0df085a5cf3d9fa3d47d91e9ea2f61135a382d8ac",
  "schema_version": 1,
  "failures_truncated": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mekler-ai-csv-data-validator-2bb5f592/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.mekler.ai](https://www.zero.xyz/host/api.mekler.ai/llms.txt)
