81trust / 100
Json Validate
by JSON Schema validate in Documents & files
x402 APIPassing, checked 2 h ago
Validate a JSON document against a JSON Schema (draft-07 subset) and get the list of violations. Supports type, required, properties, items, enum, const, min/max, length, pattern, format, anyOf/allOf/oneOf/not, additionalProperties. Deterministic - check an agent's structured output before you trust it.
POST https://agent402.tools/api/json-validate
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 209 ms typical, 375 ms slowest 5%
- Last check
- 2 h ago
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X POST "https://agent402.tools/api/json-validate" \
-H "content-type: application/json" \
-d '{"data":{"age":3,"name":"x"},"schema":{"properties":{"age":{"minimum":0,"type":"integer"},"name":{"type":"string"}},"required":["name"],"type":"object"}}'import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagent402.tools%2Fapi%2Fjson-validate
const res = await pay("https://agent402.tools/api/json-validate", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"data":{"age":3,"name":"x"},"schema":{"properties":{"age":{"minimum":0,"type":"integer"},"name":{"type":"string"}},"required":["name"],"type":"object"}}),
});
console.log(await res.json());Example input
{
"data": {
"age": 3,
"name": "x"
},
"schema": {
"properties": {
"age": {
"minimum": 0,
"type": "integer"
},
"name": {
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
}
}Example output
{
"errors": [],
"valid": true
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 2 h ago | Passed | 402 | 204 ms | $0.001 |
| 5 h ago | Passed | 402 | 226 ms | $0.001 |
| 9 h ago | Passed | 402 | 186 ms | $0.001 |
| 13 h ago | Passed | 402 | 375 ms | $0.001 |
| 16 h ago | Passed | 402 | 213 ms | $0.001 |
| 21 h ago | Passed | 402 | 186 ms | $0.001 |
| 24 h ago | Passed | 402 | 209 ms | $0.001 |
| 27 h ago | Passed | 402 | 183 ms | $0.001 |
| 32 h ago | Passed | 402 | 506 ms | $0.001 |