{"uid":"cap_LGuqerJSGFDiXjomWA_ol","slug":"aiskills402-csv-repair-1a1d8065","name":"AISkills402 CSV Repair","description":"CSV Repair API: turns CSV a parser rejects into valid CSV without changing any cell - fixes quotes, pads short rows, unwraps Markdown tables, chat text and fences; 1,250 and 007 stay as written. $0.004 USDC per call, no account, no language model: a too-long row, an ambiguous row or prose with no table gets a paid CANNOT REPAIR verdict. POST JSON {input} up to 60 000 chars; free example at https://api.aiskills402.com/v1/run/csv-repair/example","url":"https://api.aiskills402.com/v1/run/csv-repair?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"input":{"type":"string","maxLength":60000,"minLength":1,"description":"Text that was meant to be a CSV table and does not parse: open quotes, stray quotes, short rows, a Markdown table, chat text or a fence around the data."},"line_endings":{"enum":["lf","crlf"],"default":"lf","description":"Line break between rows in the output; breaks inside cells are kept as written."}}},"responseSchema":{"type":"json","example":{"ok":true,"skill":"csv-repair","engine":"1.0.0","replay":false,"result":{"csv":"id,amount,note\n7,\"1,250\",ok\n8,40,\"Bolt 5\"\" long\"\n9,12,","rows":4,"columns":3,"delimiter":","},"receipt":{"tx":"0x<settlement transaction>","settled":true},"refusal":null,"input_sha256":"<sha256 of the request>"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_0p5NEzwr5EMU9MxhBARdr","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fixes malformed CSV text — open quotes, stray quotes, short rows, Markdown tables, or fenced data — and returns a clean, parseable CSV string with row/column counts.","exampleAgentPrompt":"This CSV won't parse because of open quotes and mismatched rows — can you fix it and give me a clean, valid CSV with LF line endings? Here's the raw text: 'id,amount,note\n7,\"1,250,ok\n8,40,\"Bolt 5\" long\n9,12,'","exampleUseCases":[{"title":"Repair LLM-generated broken CSV","prompt":"The CSV my AI pipeline just generated has stray quotes and short rows and nothing will import it — can you repair it and return a clean parseable CSV with LF line endings? Here's the broken text: 'name,score,tag\nAlice,\"92,A+\nBob,78\nCarol,\"85,\"B\"'"},{"title":"Convert Markdown table to CSV","prompt":"I have a Markdown table I copied from a wiki and I need it as a proper CSV file — can you convert it for me with CRLF line endings? Here's the table: '| id | price | item |\n|---|---|---|\n| 1 | $4.99 | Bolt |\n| 2 | $12.00 | Nut |'"},{"title":"Fix CSV export with embedded commas and quotes","prompt":"My spreadsheet export has cells with commas inside them and the quotes aren't escaped properly so the file breaks every parser I try — please repair it into a valid CSV with LF line endings. The raw data is: 'sku,desc,price\nA1,\"Heavy, bolt,4.99\nA2,Nut 1/4\",1.20'"}],"resultDescription":"A JSON object containing: a 'csv' field with the fully repaired, parseable CSV string; 'rows' and 'columns' integer counts; the detected 'delimiter'; a 'replay' boolean; an 'input_sha256' hash of the request; and a 'receipt' object with the on-chain settlement transaction hash confirming the x402 USDC payment.","failureModes":["Input text is too short (minLength:1 violation) or exceeds 60,000 characters — returns validation error","Input is not recognizably tabular data at all and cannot be repaired — may return a refusal in the 'refusal' field","Network or payment settlement failure — receipt may show settled:false","Ambiguous delimiter that cannot be confidently detected — repaired CSV may use wrong separator","Malformed JSON request body — returns HTTP 400"],"whenToPreferThis":"Choose this endpoint when you have text that was intended to be CSV but fails to parse due to quote errors, row-length mismatches, Markdown formatting, or fence blocks, and you need a clean, immediately usable CSV string back. It is purpose-built for CSV repair specifically — prefer it over general-purpose LLM calls when you need deterministic, schema-validated CSV output with row/column metadata and an on-chain payment receipt. If your data is YAML rather than CSV, use the sibling YAML Repair endpoint instead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-15T06:30:27.051Z","isFirstParty":false,"canonicalSlug":"aiskills402-csv-repair-1a1d8065"}