# Relaystation Data Filter

> Relaystation Data Filter 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-16).

Filter rows in a dataset by a structured predicate — injection-safe, no formula evaluation — billed per MB processed

## Facts

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

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-filter-fc440871 -d '<json body>'
```

Example prompt: Filter this dataset to keep only rows where status is 'active' and amount is greater than 100 — I need it injection-safe and no formula evaluation.

## When to prefer this

Choose this endpoint when you need to safely filter structured row-based data using a predicate without risking injection attacks or formula evaluation side effects. It is ideal for agents processing untrusted or user-supplied data where safe, sandboxed filtering is critical. Prefer this over SQL queries or spreadsheet formula engines when you need a lightweight, pay-per-MB serverless filter with no infrastructure setup.

## Known failure modes

- Malformed predicate syntax returns a 400 error describing the parsing issue
- Payload too large may result in timeout or size rejection
- Invalid field references in predicate (fields not present in data) may return empty results or a schema mismatch error
- Insufficient USDC balance or x402 payment failure results in 402 Payment Required
- Empty dataset returns empty result set without error

## How this service works

$0.0002/MB. Keep rows matching a structured predicate — injection-safe, no formula eval. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny

## Output

Returns only the rows from the input dataset that match the specified structured predicate. The response contains the filtered subset of records in the same format as input, billed at $0.0002/MB of data processed, with a 1¢ minimum charge via x402 and any remainder auto-credited.

## Request schema (JSON Schema)

```json
{
 "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": {
      "to": {
       "enum": [
        "csv",
        "tsv",
        "json",
        "ndjson"
       ],
       "type": "string",
       "description": "A tabular file format: csv, tsv, json (array of objects), or ndjson."
      },
      "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."
      },
      "where": {
       "type": "object",
       "properties": {
        "op": {
         "enum": [
          "eq",
          "ne",
          "gt",
          "gte",
          "lt",
          "lte",
          "contains",
          "startsWith",
          "endsWith",
          "in",
          "isNull",
          "notNull"
         ],
         "type": "string"
        },
        "or": {
         "type": "array",
         "items": {
          "type": "object"
         }
        },
        "and": {
         "type": "array",
         "items": {
          "type": "object"
         }
        },
        "not": {
         "type": "object"
        },
        "value": {
         "description": "Comparison value (a scalar; an array for op=in; omitted for isNull/notNull)."
        },
        "column": {
         "type": "string"
        }
       },
       "description": "Structured predicate tree: a leaf { column, op, value? } or a branch { and: [...] } | { or: [...] } | { not: {...} }."
      }
     }
    },
    "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"
    }
   }
 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/relaystation-data-filter-fc440871/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)
