80trust / 100

Normalize Json

by NetIntel in AI models & inference

x402 APIPassing, checked just now

Conform messy or inconsistent JSON to a target schema using Claude Haiku — renames keys, coerces types (string→number, "true"→boolean, etc.), and fills missing fields with null, returning JSON that matches the exact shape the caller specified so agents can normalize data from varied sources into one consistent structure.

POST https://netintel.dev/normalize/json

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
285 ms typical, 361 ms slowest 5%
Last check
just now
Next check
in 30 min

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://netintel.dev/normalize/json" \
  -H "content-type: application/json" \
  -d '{"data":{"active":"yes","age":"42","fullName":"Jane Doe","signup":"March 1 2024","tags":"vip,beta"},"schema":{"age":"number","full_name":"string","is_active":"boolean","signup_date":"date","tags":"string[]"}}'
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%2Fnetintel.dev%2Fnormalize%2Fjson
const res = await pay("https://netintel.dev/normalize/json", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"data":{"active":"yes","age":"42","fullName":"Jane Doe","signup":"March 1 2024","tags":"vip,beta"},"schema":{"age":"number","full_name":"string","is_active":"boolean","signup_date":"date","tags":"string[]"}}),
});
console.log(await res.json());

Example input

{
  "data": {
    "active": "yes",
    "age": "42",
    "fullName": "Jane Doe",
    "signup": "March 1 2024",
    "tags": "vip,beta"
  },
  "schema": {
    "age": "number",
    "full_name": "string",
    "is_active": "boolean",
    "signup_date": "date",
    "tags": "string[]"
  }
}

Example output

{
  "cached": false,
  "fields_in_schema": 5,
  "fields_nulled": 0,
  "fields_populated": 5,
  "findings": [],
  "grade": "A",
  "normalized": {
    "age": 42,
    "full_name": "Jane Doe",
    "is_active": true,
    "signup_date": "2024-03-01",
    "tags": [
      "vip",
      "beta"
    ]
  },
  "schema_match": true,
  "score": 100
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
just nowPassed402181 ms$0.05
4 h agoPassed402361 ms$0.05
7 h agoPassed402356 ms$0.05
11 h agoPassed402285 ms$0.05
15 h agoPassed402291 ms$0.05
18 h agoPassed402435 ms$0.05
22 h agoPassed402182 ms$0.05
26 h agoPassed402185 ms$0.05
29 h agoPassed402321 ms$0.05
34 h agoPassed402178 ms$0.05