{"openapi":"3.1.0","info":{"title":"FERAL Tools API","version":"1.0.0","description":"Free and pay-per-call deterministic JSON tools using x402 USDC on Base.","contact":{"url":"https://feral-tools.vercel.app"},"x-guidance":"Call GET /api/catalog first. Use POST /api/format for $0.10 JSON normalization or POST /api/audit for a $3.00 schema audit. An unpaid request returns an x402 v2 PAYMENT-REQUIRED challenge on Base; verify the exact amount and payTo address before retrying the same request."},"servers":[{"url":"https://feral-tools.vercel.app"}],"paths":{"/api/health":{"get":{"operationId":"getHealth","summary":"Free service health","security":[],"responses":{"200":{"description":"Healthy"}}}},"/api/catalog":{"get":{"operationId":"getCatalog","summary":"Free service catalog","security":[],"responses":{"200":{"description":"Catalog"}}}},"/api/check":{"post":{"operationId":"checkJsonFree","tags":["developer-tools","json","free"],"summary":"Check and normalize JSON for free","description":"Free 16 KB preview of the JSON Guard engine. No wallet required.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"json":{"description":"A JSON value or a string containing JSON"},"indent":{"type":"integer","minimum":0,"maximum":8,"default":2},"sortKeys":{"type":"boolean","default":false},"schema":{"type":"object","description":"Optional JSON Schema draft-07"}},"required":["json"],"additionalProperties":false}}}},"responses":{"200":{"description":"Validated and normalized JSON"},"400":{"description":"Invalid request"},"413":{"description":"Free request exceeds 16 KB"}}}},"/api/format":{"post":{"operationId":"normalizeJson","tags":["developer-tools","json","x402"],"summary":"Validate and canonicalize JSON","description":"Validate against an optional draft-07 schema, normalize, and fingerprint JSON. Costs $0.10 USDC on Base via x402 v2.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.100000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"json":{"description":"A JSON value or a string containing JSON"},"indent":{"type":"integer","minimum":0,"maximum":8,"default":2},"sortKeys":{"type":"boolean","default":false},"schema":{"type":"object","description":"Optional JSON Schema draft-07"}},"required":["json"],"additionalProperties":false}}}},"responses":{"200":{"description":"Validated and canonicalized JSON","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"formatted":{"type":"string"},"canonical":{"type":"string"},"sha256":{"type":"string"},"type":{"type":"string"},"indent":{"type":"integer"},"sortKeys":{"type":"boolean"},"schemaValid":{"type":["boolean","null"]},"schemaErrors":{"type":"array","items":{"type":"object"}}},"required":["ok","formatted","canonical","sha256","type","indent","sortKeys","schemaValid","schemaErrors"]}}}},"400":{"description":"Invalid request"},"402":{"description":"x402 payment required"}}}},"/api/audit":{"post":{"operationId":"auditJsonSchema","tags":["developer-tools","json-schema","x402"],"summary":"Audit a JSON Schema contract","description":"Return a deterministic score, sample-validation result, and prioritized contract findings. Costs $3.00 USDC on Base via x402 v2.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"3.000000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"type":"object","description":"JSON Schema to audit"},"sample":{"description":"Optional JSON value to validate"}},"required":["schema"],"additionalProperties":false}}}},"responses":{"200":{"description":"Deterministic schema audit","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"score":{"type":"integer","minimum":0,"maximum":100},"grade":{"type":"string","enum":["A","B","C","D","F"]},"schemaValid":{"type":"boolean"},"sampleValid":{"type":["boolean","null"]},"findings":{"type":"array","items":{"type":"object"}},"schemaSha256":{"type":"string"}},"required":["ok","score","grade","schemaValid","sampleValid","findings","schemaSha256"]}}}},"400":{"description":"Invalid request"},"402":{"description":"x402 payment required"}}}}}}