75trust / 100

Csv Table Convert Execute

by tradepilotusa.com in Documents & files

x402 APIPassing, checked 7 min ago

Convert comma/tab-delimited quoted CSV to JSON string rows or JSON string rows to CSV. Preserves string values, duplicate headers and ragged rows; no type inference. CSV output escapes spreadsheet formula starters by default and reports alterations. Maximum 500 rows and 50 columns.

POST https://www.tradepilotusa.com/api/agent-commerce/v1/services/csv_table_convert/execute

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
710 ms typical, 942 ms slowest 5%
Last check
7 min ago
Next check
in 21 min

How to call it

# bash or zsh: see the payment challenge (nothing is charged)
curl -g -i -X POST 'https://www.tradepilotusa.com/api/agent-commerce/v1/services/csv_table_convert/execute' \
  -H 'content-type: application/json' \
  --data-raw '{"direction":"csv_to_json","source":"name,note\r\nAda,\"Hello, world\""}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fwww.tradepilotusa.com%2Fapi%2Fagent-commerce%2Fv1%2Fservices%2Fcsv_table_convert%2Fexecute
const res = await pay("https://www.tradepilotusa.com/api/agent-commerce/v1/services/csv_table_convert/execute", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: "{\"direction\":\"csv_to_json\",\"source\":\"name,note\\r\\nAda,\\\"Hello, world\\\"\"}",
});
console.log(await res.json());

Example input

{
  "direction": "csv_to_json",
  "source": "name,note\r\nAda,\"Hello, world\""
}

Example output

{
  "provenance": {
    "execution": "deterministic_local",
    "model_used": false,
    "network_request_performed": false
  },
  "request_id": "example_csv_table_convert",
  "result": {
    "formula_cells_escaped": 0,
    "json": "[[\"name\",\"note\"],[\"Ada\",\"Hello, world\"]]",
    "row_count": 2,
    "rows": [
      [
        "name",
        "note"
      ],
      [
        "Ada",
        "Hello, world"
      ]
    ]
  },
  "utility": "csv_table_convert"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
7 min agoPassed402942 ms$0.01
4 h agoPassed402708 ms$0.01
8 h agoPassed402733 ms$0.01
12 h agoPassed402657 ms$0.01
16 h agoPassed402698 ms$0.01
19 h agoPassed4021.1 s$0.01
23 h agoPassed402691 ms$0.01
26 h agoPassed402677 ms$0.01
30 h agoPassed402786 ms$0.01
33 h agoPassed402680 ms$0.01
37 h agoPassed402705 ms$0.01
40 h agoPassed402803 ms$0.01
45 h agoPassed402935 ms$0.01
2 days agoPassed402710 ms$0.01
2 days agoPassed402889 ms$0.01