# CSV Unpivot

> CSV Unpivot is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Converts wide-format CSV columns into long-format name/value row pairs, returning normalized row counts and a versioned deterministic result.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/csv-unpivot
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/csv-unpivot-5a37ff01
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lTnsQ71lMDbcPRj4-50Fo

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 csv-unpivot-5a37ff01 -d '<json body>'
```

Example prompt: Take this CSV text where 'region' and 'product' are the id columns and 'Q1', 'Q2', 'Q3', 'Q4' are the value columns, and unpivot it so each quarter becomes a separate name-value row.

## When to prefer this

Choose this endpoint when you have wide-format CSV data that needs to be reshaped into long/tall format before passing to a downstream tool with a strict row-level contract. It is stateless and deterministic, making it safe for idempotent pipelines. Prefer it over general-purpose code execution when you need a cheap, fast, versioned reshaping step without spinning up a compute environment.

## Known failure modes

- Column names in id_columns or value_columns not found in the CSV header — returns validation error with unmatched column names
- Malformed or unparseable CSV text — returns parsing error
- Input exceeds 8192-character text limit — returns size limit error
- Empty value_columns array — returns validation finding with zero unpivoted rows
- Overlapping id_columns and value_columns — returns conflict error

## How this service works

CSV Unpivot: CSV Unpivot converts selected wide CSV columns into name and value rows from bounded caller-supplied values without an external provider. Call CSV Unpivot before an agent hands structured data or a batch plan to a downstream tool with a stricter contract. Returns the bounded transformation or validation finding with counts, normalized values, and a versioned result contract for CSV Unpivot as versioned deterministic JSON. Price: $0.001 USDC via x402 on Base. First-party, stateless,…

## Output

A versioned deterministic JSON object containing the unpivoted rows as name-value pairs, counts of input and output rows, normalized values, and a result contract version identifier. No data is retained after processing.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "maxLength": 8192,
   "description": "Text supplied to CSV Unpivot; used only for this bounded calculation and processed in memory without retention."
  },
  "id_columns": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 8192
   },
   "maxItems": 256,
   "description": "Id Columns supplied to CSV Unpivot; used only for this bounded calculation and processed in memory without retention."
  },
  "value_columns": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 8192
   },
   "maxItems": 256,
   "description": "Value Columns supplied to CSV Unpivot; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "csv": "id,variable,value\n1,q1,10\n1,q2,20",
   "row_count": 2
  },
  "schema": "delx/util-csv-unpivot/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "1664e3ca93eaf50bde3e9b8dfa73ca0237be72fb4f663837d3df1087aa684d02",
   "external_calls": 0
  },
  "operation": "data_batch:csv_unpivot"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/csv-unpivot-5a37ff01/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
