# Wealth Agent CSV↔JSON Converter

> Wealth Agent CSV↔JSON Converter is a paid API for AI agents from wealth-agent.wealthagent-app.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-19).

Converts CSV/TSV text to JSON or JSON arrays to CSV format via a paid API endpoint

## Facts

- Endpoint: GET https://wealth-agent.wealthagent-app.workers.dev/api/x402/csv-json?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/wealth-agent-csv-json-converter-a09db354
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_R-9NRGVlaiLHRrXdaiy5J

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 wealth-agent-csv-json-converter-a09db354
```

Example prompt: Convert this CSV text into a JSON array: 'name,price\nApple,1.50\nBanana,0.75'

## When to prefer this

Choose this endpoint when you need a simple, paid-per-call microservice to convert between CSV/TSV and JSON without setting up your own parsing logic. It is well-suited for agent workflows that occasionally need tabular data reformatting as part of a larger pipeline, especially when the x402 micropayment model is already in use. Prefer a local library if you are doing high-volume batch conversions where per-call costs would accumulate significantly.

## Known failure modes

- Malformed or unparseable CSV/TSV input returns an error field in the response
- Missing required 'data' query parameter causes a validation error
- Mismatched or ambiguous format when 'to' is omitted may result in incorrect direction inference
- Payment failure or insufficient USDC balance causes a 402 response before processing begins
- Empty data input may return zero rows with no useful output

## How this service works

Convert tabular data between CSV/TSV and a JSON array of objects, in either direction, with detected delimiter and typed columns. Use it when a tool returns CSV but your pipeline needs JSON (or the reverse) and you do not want to run a parser yourself.

## Output

Returns a JSON object containing the converted data (a JSON array when converting from CSV, or CSV text when converting from JSON), along with metadata including the kind of conversion performed ('csv-json'), the number of rows, the column names, and the direction of conversion.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "data"
     ],
     "properties": {
      "to": {
       "enum": [
        "json",
        "csv"
       ],
       "type": "string",
       "description": "Target format (optional; inferred when omitted)"
      },
      "data": {
       "type": "string",
       "description": "CSV/TSV text or a JSON array of objects"
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "ok",
      "resource",
      "status",
      "deliverable"
     ],
     "properties": {
      "ok": {
       "type": "boolean"
      },
      "tx": {
       "type": [
        "string",
        "null"
       ]
      },
      "note": {
       "type": "string"
      },
      "error": {
       "type": [
        "string",
        "null"
       ]
      },
      "job_id": {
       "type": [
        "string",
        "null"
       ]
      },
      "status": {
       "enum": [
        "delivered",
        "paid_not_delivered"
       ],
       "type": "string"
      },
      "resource": {
       "type": "string"
      },
      "receipt_id": {
       "type": [
        "string",
        "null"
       ]
      },
      "deliverable": {
       "type": [
        "object",
        "null"
       ],
       "required": [
        "kind",
        "summary"
       ],
       "properties": {}
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "json": [
   {
    "name": "A",
    "price": 100
   }
  ],
  "kind": "csv-json",
  "rows": 2,
  "columns": [
   "name",
   "price"
  ],
  "direction": "to-json"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/wealth-agent-csv-json-converter-a09db354/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from wealth-agent.wealthagent-app.workers.dev](https://www.zero.xyz/host/wealth-agent.wealthagent-app.workers.dev/llms.txt)
