# Relaystation Derive Computed Columns

> Relaystation Derive Computed Columns 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-15).

Adds computed columns to structured data using injection-safe expressions without formula evaluation

## Facts

- Endpoint: POST https://api.relaystation.ai/v1/data/derive
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/relaystation-derive-computed-columns-5b62ab08
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YEO9wNKETQGY9K33JSN8p

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-derive-computed-columns-5b62ab08 -d '<json body>'
```

Example prompt: Take my product table and add a 'margin_pct' column derived from (price - cost) / price, and a 'discounted_price' column computed as price * 0.85 — use injection-safe expression evaluation so no raw formula is executed.

## When to prefer this

Choose this endpoint when you need to safely add computed or derived columns to structured/tabular data using declarative expressions, especially when security is a concern and arbitrary formula execution (e.g., spreadsheet EVAL) is not acceptable. Prefer it over general-purpose code execution when you want a lightweight, per-MB-billed operation that is idempotent and side-effect-free. It is ideal for ETL pipelines, data enrichment steps, and preprocessing stages where new fields must be derived from existing ones without running untrusted code.

## Known failure modes

- Invalid or unparseable column expression — returns an error describing which expression failed
- Reference to a non-existent source column — returns a field resolution error
- Malformed input data structure — returns a schema validation error
- Division by zero or null reference in expression — returns a per-row computation error or null for affected rows
- Insufficient x402 payment credits — returns a payment required error

## How this service works

$0.0002/MB. Add computed columns from structured expressions — injection-safe, no formula eval. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny

## Output

Returns the original structured dataset augmented with one or more new computed columns, where each new column's values are calculated per-row from the provided expressions. The evaluation is injection-safe and does not run arbitrary formula code. Billed at $0.0002/MB of data processed with a 1¢ minimum via x402; any remainder is 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": {
     "properties": {}
    },
    "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"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/relaystation-derive-computed-columns-5b62ab08/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)
