Skip to content
data · documents · data · json-to-schema · schema-generator · json-schema-inference · draft-2020-12 · infer-field-types · required-fields · sample-data · csv-schema · tsv-schema · jsonl-schema · yaml-schema · records · nested-schema · numeric-null-inference · validation

JSON Schema generator

Create and generate a nested JSON Schema Draft 2020-12 contract by inferring field types and required fields from representative JSON, CSV, TSV, JSON Lines, or YAML records, with equivalent CSV/TSV numeric and null inference, input evidence, and non-enforcing observed bounds.

$0.025 USDCBase + Solanax402 v2POSTCustomer-evidenced
Pay $0.025 USDC and run in your browserView free result sample

Endpoint

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

Send the JSON body below. An unpaid request returns HTTP 402 with a PAYMENT-REQUIRED header; an x402-compatible buyer signs the requirement and retries with PAYMENT-SIGNATURE.

Pay $0.025 USDC and run in your browser

Official Coinbase agent path

Coinbase Agentic Wallet can satisfy this x402 request in one command. Running it may pay automatically, so --max-amount is fixed to $0.025 USDC in atomic units. Copying the command does not install, authenticate, sign, or pay; review the request and use a separate low-value wallet before running it.

npx --yes awal@latest x402 pay https://apiacre.com/v1/data/schema \
  -X POST \
  -d '{"content":"[{\"name\":\"Ada\",\"score\":98}]","format":"json","root_mode":"records"}' \
  --max-amount 25000 \
  --json

Coinbase pay-for-service documentation · Buyer setup and wallet safety

Alternative third-party AgentCash commands

Run check first without payment. Its fetch command may automatically pay up to the exact listed price.

npx --yes agentcash@latest check https://apiacre.com/v1/data/schema
npx --yes agentcash@latest fetch https://apiacre.com/v1/data/schema \
  --method POST \
  --header 'content-type: application/json' \
  --body '{"content":"[{\"name\":\"Ada\",\"score\":98}]","format":"json","root_mode":"records"}' \
  --payment-protocol x402 \
  --payment-network base \
  --max-amount 0.025

AgentCash CLI documentation

Input example

{
  "content": "[{\"name\":\"Ada\",\"score\":98}]",
  "format": "json",
  "root_mode": "records"
}

Response shape

View free static sample JSON

{
  "request_id": "018f1f54-7f38-7ba2-8dc3-5f90272d9f1a",
  "service": "data.schema",
  "version": "1",
  "data": {
    "schema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "array",
      "x-apiacre-observed": {
        "sampleCount": 1,
        "presentCount": 1,
        "missingCount": 0,
        "nullCount": 0,
        "types": [
          "array"
        ],
        "arrayLength": {
          "minimum": 1,
          "maximum": 1
        }
      },
      "items": {
        "type": "object",
        "x-apiacre-observed": {
          "sampleCount": 1,
          "presentCount": 1,
          "missingCount": 0,
          "nullCount": 0,
          "types": [
            "object"
          ]
        },
        "properties": {
          "name": {
            "type": "string",
            "x-apiacre-observed": {
              "sampleCount": 1,
              "presentCount": 1,
              "missingCount": 0,
              "nullCount": 0,
              "types": [
                "string"
              ],
              "stringLength": {
                "minimum": 3,
                "maximum": 3
              }
            }
          },
          "score": {
            "type": "integer",
            "x-apiacre-observed": {
              "sampleCount": 1,
              "presentCount": 1,
              "missingCount": 0,
              "nullCount": 0,
              "types": [
                "integer"
              ]
            }
          }
        },
        "required": [
          "name",
          "score"
        ]
      }
    },
    "input": {
      "format": "json",
      "rootMode": "records",
      "records": 1,
      "characters": 27,
      "utf8Bytes": 27,
      "sha256": "c643e5c255c8922bcd1163746ad6233618735d05482f8d2fa68e30021648f076"
    },
    "inference": {
      "version": "apiacre-schema-inference/3",
      "dialect": "https://json-schema.org/draft/2020-12/schema",
      "csvNumericStringsCoerced": false,
      "csvEmptyStringsAsNull": false,
      "tabularNumericStringsCoerced": false,
      "tabularEmptyStringsAsNull": false,
      "nodesProcessed": 4,
      "nonStringKeysNormalized": 0,
      "dateTimeScalarsNormalized": 0,
      "observedBoundsEnforced": false,
      "maximumDepth": 20,
      "complete": true,
      "warnings": []
    }
  },
  "meta": {
    "duration_ms": 42,
    "cached": false,
    "sources": [],
    "warnings": [],
    "next_actions": [
      {
        "service": "data.schema-validate",
        "title": "JSON Schema validation",
        "reason": "Validate a future JSON value against the inferred Draft 2020-12 contract.",
        "method": "POST",
        "path": "/v1/data/schema-validate",
        "price": "$0.01",
        "input_template": {
          "schema": "$result.data.schema",
          "instance": "$futureJsonValue",
          "max_errors": 25,
          "check_formats": true
        },
        "use_output": "Require result.data.valid and inspect JSON Pointer errors before accepting the value.",
        "handoff_path": "/catalog/data.schema-validate",
        "checkout_path": "/try/data.schema-validate",
        "sample_path": "/samples/data.schema-validate",
        "maximum_atomic_usdc": "10000",
        "handoff_payment_required": false,
        "executes_automatically": false,
        "authorization_required": true
      }
    ]
  }
}

Complete recipes using this API

These buyer-controlled recipes connect this service to compatible API Acre results. Every step has its own exact price and requires separate authorization.

Continue this workflow

These optional follow-ups use this result in a larger workflow. Each call shows a fresh x402 challenge and requires separate buyer authorization.

Try the payment challenge

curl -i -X POST 'https://apiacre.com/v1/data/schema' \
  -H 'content-type: application/json' \
  --data '{"content":"[{\"name\":\"Ada\",\"score\":98}]","format":"json","root_mode":"records"}'