{"uid":"cap_hr1C_8yzd4AJH1qehG6Fl","slug":"ai-data-tools-clean-with-audit-trail-2310ff45","name":"AI Data Tools – Clean with Audit Trail","description":"Data Quality Gate: deterministic repair + replayable audit trail","url":"https://www.aidatatools.dev/api/clean/audit?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"array","items":{"type":"object"},"description":"The scraped data to process. A JSON array of objects, a single object, a CSV string or raw text are all accepted -- the endpoint detects the shape and gives the same shape back."},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"data":[{"sku":"B0C1","price":"12,99","title":"Café Table Lamp & Shade"}],"audit":{"ledger":[{"path":"[0].title","rule":"mojibake.repair","after":"Café","before":"CafÃ©"}],"replay_id":"sha256:..."}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.12","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.12/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.12","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.12","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_YZ-AdBHEqqW4ZwWQMYpL7","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.12","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Repairs scraped data deterministically (e.g. encoding, formatting issues) and returns a replayable, SHA-256-keyed audit ledger of every change made","exampleAgentPrompt":"Clean this scraped product data array — it has mojibake encoding issues and messy price formatting — and give me back the fixed records along with a full audit ledger showing exactly what was changed and a replay ID I can use to verify the repairs later.","exampleUseCases":[{"title":"Repair garbled e-commerce product titles","prompt":"I scraped a bunch of product listings and some titles have encoding problems like 'CafÃ©' instead of 'Café' — can you clean this JSON array and give me a ledger showing every field that was fixed?"},{"title":"Auditable ETL pipeline data repair","prompt":"Before we load this batch of scraped records into our database, run them through the deterministic cleaner and return the audit trail with a SHA-256 replay ID so we can prove exactly what changed if anyone questions the data later."},{"title":"Fix CSV price formatting from web scrape","prompt":"This CSV I scraped has prices formatted like '12,99' with commas instead of decimals — clean it up and show me an audit log of every field that was modified so I have a replayable record of the transformation."}],"resultDescription":"Returns the cleaned data in the same shape as the input (JSON array of objects, single object, CSV, or text), alongside an audit object containing a ledger array that lists every field path touched, the rule applied (e.g. 'mojibake.repair'), the before and after values, and a SHA-256 replay_id for verifiable, replayable audit purposes.","failureModes":["Malformed or empty body array returns a validation error","Unsupported bodyType enum value causes a 400-level rejection","Extremely large payloads may exceed request limits","If no repairs are needed, ledger may be empty but replay_id is still returned","Network timeouts on slow upstream connections"],"whenToPreferThis":"Choose this endpoint when you need not only cleaned data but a cryptographically verifiable, replayable audit trail of every repair — ideal for compliance-sensitive pipelines, regulated data workflows, or any scenario where you must prove what changed and why. Prefer this over the base clean endpoint when auditability and reproducibility are requirements, not just nice-to-haves.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-03T00:34:33.673Z","isFirstParty":false,"canonicalSlug":"ai-data-tools-clean-with-audit-trail-2310ff45"}