Buyer-controlled x402 recipe

Convert structured data and enforce its contract

Convert caller-supplied CSV, TSV, JSON, JSON Lines, or YAML into deterministic JSON, infer a Draft 2020-12 schema from the converted records, then validate a caller-supplied future JSON value against that contract.

3separately authorized steps
$0.04maximum listed total · USDC
eip155:8453Base network
1
$0.005 USDC · separate authorization

Data conversion

Normalize the supplied structured data into deterministic JSON.

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

Input template

{
  "content": "$structuredData",
  "format": "$sourceFormat",
  "target_format": "json",
  "root_mode": "records"
}
Use this result

Verify result.data.inputSha256 and outputSha256, then pass result.data.content to schema inference.

2
$0.025 USDC · separate authorization

Schema inference

Infer a reusable contract from the converted JSON records.

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

Input template

{
  "content": "$step1.result.data.content",
  "format": "json",
  "root_mode": "records"
}
Use this result

Pass result.data.schema to the validation step.

3
$0.01 USDC · separate authorization

JSON Schema validation

Validate a future caller-supplied JSON value against the inferred contract.

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

Input template

{
  "schema": "$step2.result.data.schema",
  "instance": "$futureJsonValue",
  "max_errors": 25,
  "check_formats": true
}
Use this result

Require result.data.valid and inspect bounded JSON Pointer errors before accepting the future value.

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.