{"uid":"cap_G7pX3_2TeNDzokyXIc2vb","slug":"relaystation-data-validate-f0955c4c","name":"Relaystation Data Validate","description":"$0.0002/MB. Validate rows against a structured schema — row-level errors back as JSON. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny","url":"https://api.relaystation.ai/v1/data/validate","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"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> }."},"from":{"enum":["csv","tsv","json","ndjson"],"type":"string","description":"A tabular file format: csv, tsv, json (array of objects), or ndjson."},"schema":{"type":"object","description":"Per-column rules, keyed by column name.","additionalProperties":{"type":"object","properties":{"max":{"type":"number"},"min":{"type":"number"},"type":{"enum":["string","integer","number","boolean","date"],"type":"string"},"pattern":{"type":"string","description":"A bounded, length-capped RegExp over cell strings — never code."},"required":{"type":"boolean"}}}}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":{"request":{"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":[]}}},"response":{"valid":true,"errors":[],"rowCount":3,"truncated":false,"errorCount":0}},"exampleRequest":{"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}}},"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_pJbYUrRxaObw6rUSJdM13","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates rows in a CSV or structured file against a user-defined JSON schema, returning row-level validation errors as JSON","exampleAgentPrompt":"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?","exampleUseCases":[{"title":"Pre-import data quality check","prompt":"Before I import this CSV of customer records into our database, can you validate it against our schema where name and email are required strings and age must be an integer between 0 and 120? Flag any rows that don't pass."},{"title":"Pipeline bad-row detection","prompt":"I'm running a data pipeline and need to catch any rows in this CSV that violate our structure — product_id is a required integer, price is a required number with min 0, and category is a required string. Can you check all rows and return the errors as JSON?"},{"title":"User-uploaded file validation","prompt":"A user just uploaded a CSV form submission. Can you check every row against my schema — first_name and last_name are required strings, zip_code is a required string, and score is an integer between 1 and 100 — and tell me how many rows are invalid and why?"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:50:11.178Z","isFirstParty":false}