Buyer-controlled x402 recipe

Redact and contract a supplied CSV

For CSV text up to 500,000 characters, decode a caller-supplied file, remove five common personal-data patterns, profile only the redacted records, and infer a Draft 2020-12 JSON Schema. Pattern redaction supports review but is not a compliance guarantee.

4separately authorized steps
$0.07maximum listed total · USDC
eip155:8453Base network
1
$0.01 USDC · separate authorization

Document extraction

Decode the CSV and retain source-size and SHA-256 evidence.

POSThttps://apiacre.com/v1/document/extract

Input template

{
  "filename": "$csvFilename",
  "content_base64": "$contentBase64"
}
Use this result

Verify result.data.metadata.sha256, then pass result.data.text to the redaction step.

2
$0.01 USDC · separate authorization

PII and personal-data redaction

Replace common email, phone, IPv4, payment-card, and US SSN patterns.

POSThttps://apiacre.com/v1/document/redact

Input template

{
  "text": "$step1.result.data.text",
  "types": [
    "email",
    "phone",
    "ipv4",
    "credit_card",
    "ssn"
  ]
}
Use this result

Inspect result.data.counts and review result.data.text for false positives or missed sensitive values before reuse.

3
$0.025 USDC · separate authorization

Dataset profile

Profile fields, nulls, uniqueness, and observed types after redaction.

POSThttps://apiacre.com/v1/data/profile

Input template

{
  "content": "$step2.result.data.text",
  "format": "csv"
}
Use this result

Use result.data.profile to assess the sanitized records.

4
$0.025 USDC · separate authorization

Schema inference

Infer a reusable JSON Schema from the same redacted CSV records.

POSThttps://apiacre.com/v1/data/schema

Input template

{
  "content": "$step2.result.data.text",
  "format": "csv",
  "root_mode": "records"
}
Use this result

Persist result.data.schema as an observed contract; validate policy-required constraints separately.

You stay in control. Each step is an independent API call. Inspect its HTTP 402 challenge, authorize no more than the displayed price, verify the result, and continue only when the output is suitable. The listed total is not a bundle charge.