# Agent Evidence Utility > Clean messy CSV columns with explicit rules, validate CSV imports before ETL, convert passing rows to JSON, check JSON data contracts, and catch feed schema drift. Deterministic checks cost $0.005 per call. Preflight and audit routes omit cell values; validated import returns JSON rows only when every row passes. Also offers U.S. NWS forecasts and evidence-linked text/invoice extraction. x402 USDC on Base, Arbitrum One, or Polygon. ## JavaScript x402 quick start Install @x402/core, @x402/evm, @x402/fetch, and viem. Register an EVM signer for the networks you use (Base eip155:8453, Arbitrum One eip155:42161, or Polygon eip155:137) with registerExactEvmScheme, then pass fetch and the client to wrapFetchWithPayment. Use the paid wrapper for POST calls: it handles the 402 challenge and retry. Keep the wallet key in an environment secret and fund a dedicated wallet only with the amount you intend to spend. The live 402 is the source of truth for each price and payee. ## MCP client through Agent402 MCP clients can discover this service through Agent402. Install the local connector with claude mcp add agent402 -e AGENT_KEY=0xYOUR_DEDICATED_AGENT_WALLET -- npx -y agent402-mcp, then search the catalog for the needed task and inspect the route price and input schema before calling. Use a dedicated, low-balance wallet and strict per-call and total spend budgets. Calls to this service settle USDC only on success. The live seller index is https://agent402.tools/api/index?seller=agent-evidence-extractor.defcronyke.workers.dev. Example input for the low-cost deterministic profile route: {"csv":"sku,quantity\nA1,3\nA2,4"} ## Paid API The live route catalog is indexed by [Agent402](https://agent402.tools/api/index?seller=agent-evidence-extractor.defcronyke.workers.dev). Agents can inspect route prices and call the seller endpoint directly; routed marketplace fees may increase the buyer's total. - All routes use POST and accept x402 USDC on Base (eip155:8453), Arbitrum One (eip155:42161), or Polygon (eip155:137); the live challenge is authoritative for price and recipient. - POST /v1/weather: $0.005, current U.S. NWS forecast and optional active alerts for latitude/longitude. Default forecast_type is 12_hour with 1–8 periods; set forecast_type to hourly for 1–24 hourly periods (default 12). NWS coverage varies. Source: api.weather.gov; weather.gov remains the authority for safety-critical decisions. - POST /v1/weather-batch: $0.01 for 2–5 U.S. coordinates in one request; returns independent NWS hourly or 12-hour forecasts and optional active alerts for each location. All points need NWS coverage. Deterministic, no model calls. See /examples/weather-batch. - POST /v1/extract-lite: $0.005, one gpt-6-luna pass, simple field-to-type map, exact source-quote checks, no independent model cross-check. - POST /v1/text-insights: $0.005, one gpt-6-luna medium-effort pass; choose from caller-defined categories and get coarse sentiment, source-matched keywords, a short summary, and an exact supporting quote. Up to 12,000 text characters; no independent model cross-check. - POST /v1/extract-balanced: $0.01, two independent gpt-6-luna passes plus a source-based reconciliation pass, simple field-to-type map, exact source-quote checks; not an accuracy guarantee. - POST /v1/invoice-extract: $0.01, three gpt-6-luna medium-effort passes to extract common invoice header fields from supplied text or OCR, with exact source quotes. Printed dates and amounts stay unchanged; no line items or calculations. - POST /v1/invoice-parse: $0.02, three gpt-6-luna medium-effort passes to extract invoice/receipt header fields and up to 30 printed line items from supplied text or OCR. Each value has an exact source quote; no calculations or accuracy guarantee. See /examples/invoice-parse. - POST /v1/invoice-pdf-parse: $0.01, invoice/receipt PDF OCR to structured JSON, including header fields, totals and up to 10 line items. Accepts unencrypted Base64 PDFs up to two pages and 256 KiB. Two gpt-6-luna medium-effort calls; quotes match generated OCR text, not PDF bytes. Review the original. See /examples/invoice-pdf-parse. - GET or POST /v1/pdf-text: $0.005, extract searchable PDF text page by page from a public HTTPS URL (GET ?url=...) or JSON pdf_url. Up to 20 pages and 10 MiB; no OCR/model calls. Scans without a text layer are refused. Query strings are redacted in Worker logs; URLs/documents are not retained. See /examples/pdf-text. - POST /v1/invoice-parse-lite: $0.005, one gpt-6-luna medium-effort pass to extract header fields and up to 10 printed line items. Exact source quote checks; no independent cross-check or calculations. See /examples/invoice-parse-lite. - POST /v1/ubl-invoice-extract: $0.005, deterministic extraction from UBL Invoice 2.x or CII CrossIndustryInvoice XML including Factur-X/ZUGFeRD. See /examples/ubl-invoice-extract for a CII request and response. Not EN 16931 compliance validation. No model calls or source retention. - POST /v1/csv-diff: $0.005 for a one-time, stateless comparison of before_csv and after_csv; detects header/type/order changes, missing-rate shifts, numeric bounds, optional header contracts, row-count deltas, and malformed rows. No files are retained; deterministic, no model call, no cell values returned. - POST /v1/ubl-invoice-extract: $0.005, deterministic extraction from caller-supplied UBL Invoice 2.x or CII CrossIndustryInvoice XML, including Factur-X/ZUGFeRD XML. Send either xml text or UTF-8 XML encoded as standard padded Base64 in xml_base64. Returns selected parties, invoice identifiers/dates, up to 100 line items, tax breakdowns, totals, and limited arithmetic checks. Not EN 16931 compliance validation; no model call, URL fetch, or source retention. - POST /v1/csv-monitor: $0.005 per update for recurring CSV feeds. Reuse a private monitor_token while your own scheduler sends successive snapshots; optionally persist import-validation rules. The service retains aggregate profile and contract metadata for up to 30 days, never raw rows or cell values. It does not poll URLs or send webhooks. Use forget:true to delete the profile and contract. - POST /v1/csv-profile: $0.005, infer conservative CSV column types, profile empty/distinct counts and possible unique keys, and return a draft JSON Schema 2020-12; no cell values or model calls. Review sample-based types, required fields, and business meaning before using the schema in production. - POST /v1/csv-to-json: $0.005, convert comma-, semicolon-, tab-, or pipe-delimited CSV with up to 100 columns and 1,000 records into JSON objects keyed by trimmed headers. The response reports the detected delimiter. Cell values remain strings; blank rows are skipped and counted; malformed quoting, duplicate headers, and ragged rows are rejected. Deterministic, no model call or source retention. See /examples/csv-to-json. - POST /v1/json-to-csv: $0.005, convert 1–1,000 flat JSON objects to comma-delimited CSV, preserving scalar values and escaping quotes, commas, and line breaks. Optional columns sets output order; formula-like values are preserved, not sanitized. No model call or source retention. See /examples/json-to-csv. - POST /v1/jsonl-convert: $0.005, use direction json_to_jsonl with records or jsonl_to_json with one JSON value per line; preserves JSON types and nesting up to 64 levels, accepts one trailing newline, and rejects blank/malformed lines. No model call or source retention. See /examples/jsonl-convert. - POST /v1/csv-import-json: $0.005, validate CSV before ETL/database import against caller-supplied types and rules, then return converted JSON rows only when all records pass. Set coerce_types=true to emit native number and boolean values for matching declared columns; string, date, email, and blank values remain strings. Failed validation returns row/column issue codes without cell values. No model call or source retention. See /examples/csv-import-json. - POST /v1/batch-csv-preflight: $0.01 per batch, validate 2–5 CSV files independently against one shared schema, at most 262,144 combined characters and 1,000 records per file. Optionally enable detect_duplicate_rows to flag repeated full rows. Deterministic; returns only row/column issue metadata and no cell values. - POST /v1/csv-duplicate-key-check: accepts {"text":"CSV text","key_columns":["account_id","invoice_id"]}, $0.005. Returns only issue codes and row numbers; deterministic, no model call. - POST /v1/csv-clean: $0.005, apply ordered trim, collapse_whitespace, lowercase, uppercase, or remove_control_characters operations to exact CSV column names; returns cleaned CSV and changed-cell counts. Untargeted cells, headers, and blank rows are preserved. No model call or input retention. See /examples/csv-clean. - POST /v1/csv-preflight: CSV duplicate-key check before ETL/database import, $0.005. Checks required headers, types, single-column uniqueness, composite keys such as "unique_by":[["account_id","invoice_id"]], optional exact duplicate rows, allowed values, formula-like cells, and numeric bounds. Deterministic; no model calls or cell values returned. Up to 1,000 records and 50 typed columns. - POST /v1/csv-import-audit: $0.005, combines deterministic column profiling and validation against a caller-supplied schema. Returns inferred type signals and row/column issue codes without echoing cell values; same 262,144-character and 1,000-record limits. - POST /v1/extract-fields: $0.02, seven model passes, simple field-to-type map, up to 12,000 text characters and 10 fields. - POST /v1/extract: $0.02, seven model passes, one text up to 12,000 characters and a JSON Schema with 1–10 simple primitive fields. - POST /v1/batch-extract-lite: $0.02 per batch, one gpt-6-luna pass per text across 2–5 texts, simple field map, up to 30,000 total characters; no independent cross-check. - POST /v1/batch-extract: $0.05 per batch, seven model passes over 2–5 texts, one JSON Schema, up to 30,000 total characters. - POST /v1/compare: $0.02, seven model passes to compare before/after texts up to 12,000 characters each. - All model calls use gpt-6-luna with medium reasoning effort. Unsupported values become null. Evidence quotes are checked as exact source substrings. Verify outputs before consequential use. - The service does not fetch URLs or store source documents; the accounting ledger excludes request text and model outputs. Raw payer addresses are never stored. If configured, a private keyed payer fingerprint supports aggregate unique-buyer and repeat-use reporting and is not exposed by the API. ## Integration - OpenAPI: https://agent-evidence-extractor.defcronyke.workers.dev/openapi.json - x402 discovery: https://agent-evidence-extractor.defcronyke.workers.dev/.well-known/x402 - Health: https://agent-evidence-extractor.defcronyke.workers.dev/health - Free cached example response: https://agent-evidence-extractor.defcronyke.workers.dev/examples/extract-lite - Free cached text classification example: https://agent-evidence-extractor.defcronyke.workers.dev/examples/text-insights - Free cached low-cost batch response: https://agent-evidence-extractor.defcronyke.workers.dev/examples/batch-extract-lite - Free cached CSV cleanup example: https://agent-evidence-extractor.defcronyke.workers.dev/examples/csv-clean - Free cached CSV example response: https://agent-evidence-extractor.defcronyke.workers.dev/examples/csv-preflight - Free cached CSV monitor example: https://agent-evidence-extractor.defcronyke.workers.dev/examples/csv-monitor - Free cached CSV profile example: https://agent-evidence-extractor.defcronyke.workers.dev/examples/csv-profile - Free cached CSV-to-JSON example: https://agent-evidence-extractor.defcronyke.workers.dev/examples/csv-to-json - Free cached JSON Lines examples: https://agent-evidence-extractor.defcronyke.workers.dev/examples/jsonl-convert - Free cached CSV schema drift example: https://agent-evidence-extractor.defcronyke.workers.dev/examples/csv-diff - Lite example request: POST /v1/extract-lite with {"text":"Name: Cedar, price: 4","fields":{"name":"string","price":"number"}} - Handle HTTP 402 with an x402-compatible Base wallet/payment facilitator. Do not retry without the payment protocol. ## Limits Inputs are bounded; a global daily model budget can temporarily return 429. Model-generated values may be incorrect; verify the evidence.