# Relaystation Data Validate

> Relaystation Data Validate is a paid API for AI agents from api.relaystation.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Validates rows in a CSV or structured file against a user-defined JSON schema, returning row-level validation errors as JSON

## Facts

- Endpoint: POST https://api.relaystation.ai/v1/data/validate
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/relaystation-data-validate-f0955c4c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_G7pX3_2TeNDzokyXIc2vb

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 relaystation-data-validate-f0955c4c -d '<json body>'
```

Example prompt: Can you validate this CSV against my schema — name and city should be required strings, and age should be a required integer between 0 and 150 — and tell me which rows have errors?

## When to prefer this

Choose this endpoint when you need to validate structured tabular data (CSV) row-by-row against a typed schema with constraints like required fields, type checking, and numeric min/max bounds. It is purpose-built for pre-import quality gates, ETL pipeline validation, and user file submission checks — especially when you need row-level error detail rather than a simple pass/fail, and when you want a pay-per-call model with no infrastructure to manage.

## Known failure modes

- Malformed base64 input causes parsing failure
- Schema fields with unsupported types are rejected
- CSV missing headers causes column-mapping errors
- File too large may result in truncated results (truncated: true)
- Invalid JSON schema structure returns schema parse error
- Missing required body fields (file, schema, from) causes 400-level error

## How this service works

$0.0002/MB. Validate rows against a structured schema — row-level errors back as JSON. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny

## Output

Returns a JSON object with a 'valid' boolean, an 'errors' array listing row-level validation failures with field details, a 'rowCount' integer, an 'errorCount' integer, and a 'truncated' boolean indicating whether the result set was cut off.

## Example request

```json
{
 "input": {
  "body": {
   "file": {
    "inline": "bmFtZSxhZ2UsY2l0eQpKb2huLDI4LFNhbiBGcmFuY2lzY28KSmFuZSwyNSxOZXcgWW9yawpCb2IsNDUsQm9zdG9u"
   },
   "from": "csv",
   "schema": {
    "age": {
     "max": 150,
     "min": 0,
     "type": "integer",
     "required": true
    },
    "city": {
     "type": "string",
     "required": true
    },
    "name": {
     "type": "string",
     "required": true
    }
   }
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 },
 "output": {
  "type": "object",
  "example": {
   "valid": true,
   "errors": []
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "type": "object",
     "properties": {
      "file": {
       "type": "object",
       "description": "cputools input-source: { inline: <base64 ≤ 4 MiB> } or { inputKey: <scratch key from /v1/cputools/upload-url, ≤ 50 MB> }."
      },
      "schema": {
       "type": "object",
       "description": "Per-column rules, keyed by column name.",
       "additionalProperties": {
        "type": "object",
        "properties": {
         "type": {
          "type": "string",
          "enum": [
           "string",
           "integer",
           "number",
           "boolean",
           "date"
          ]
         },
         "required": {
          "type": "boolean"
         },
         "min": {
          "type": "number"
         },
         "max": {
          "type": "number"
         },
         "pattern": {
          "type": "string",
          "description": "A bounded, length-capped RegExp over cell strings — never code."
         }
        }
       }
      },
      "from": {
       "type": "string",
       "enum": [
        "csv",
        "tsv",
        "json",
        "ndjson"
       ],
       "description": "A tabular file format: csv, tsv, json (array of objects), or ndjson."
      }
     }
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   },
   "required": [
    "type"
   ]
  }
 },
 "required": [
  "input"
 ]
}
```

## More

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