---
title: "Deterministic data-format conversion — the shape work an LLM cannot do reliably token-by-token"
method: POST
path: "/api/data/convert"
tags: ["Math"]
---

# Deterministic data-format conversion — the shape work an LLM cannot do reliably token-by-token

`POST /api/data/convert`

## Request

- Base URL: `https://api.webbersites.com`
- URL: `https://api.webbersites.com/api/data/convert`
- Auth: API key in header `X-PAYMENT`

Deterministic data-format conversion — the shape work an LLM cannot do reliably token-by-token. POST {data, from, to}: JSON, NDJSON, CSV, TSV, or a SQL INSERT dump in; any of the same out. Handles RFC 4180 quoting (commas, quotes, newlines in values), flattens nested objects to dot-notation columns, unions ragged records into a stable column set, and parses SQL string literals with '' and \' escapes. No AI, no network — same input, same bytes, every time.

Price: $0.005 per call, paid in USDC via the x402 protocol (see the x402 security scheme).

## Request body

- object
  - `data` string, required: The dataset as a string (up to ~4MB)
  - `from` string: json (default), ndjson, csv, tsv, or sql
  - `to` string: csv (default), tsv, json, ndjson, or sql
  - `flatten` boolean: Flatten nested objects to dot-notation columns (default true)
  - `header` boolean: CSV/TSV input has a header row (default true)
  - `infer_types` boolean: Convert numeric/boolean/null strings on input (default true); leading zeros stay strings
  - `delimiter` string: Override the delimiter for csv/tsv
  - `table` string: Table name when to=sql (default 'data')

## Response `200`

Success

- object
  - `from` string
  - `to` string
  - `rows` number
  - `columns` unknown[]
    - unknown
  - `output` string
  - `bytes` number

## Other responses

- `402`: Payment required — the response body lists accepted payment methods (amount, asset, network, pay-to address). Retry the request with a signed X-PAYMENT header.

---

[API](https://skmtc.dev/webbersites/apis/webbersites-x402-data-api.md) · [All operations](https://skmtc.dev/webbersites/apis/webbersites-x402-data-api/llms.txt) · [OpenAPI document](https://skmtc.dev/webbersites/apis/webbersites-x402-data-api/revisions/c14a76c67a94?raw)
