Skip to content
Fourohtwo

api.fadeandco.workers.dev/api/agent-intel/agent-json-schema-guard

Checks an agent's JSON output against a JSON Schema (draft 2020-12 keywords: type, properties, required, additionalProperties, items, enum, const, length, pattern, minimum/maximum, item counts). Returns valid yes/no, each error with its path and the value with disallowed fields removed. $ref, allOf/anyOf/oneOf, if/then and format return an error instead of passing silently.

BaseSolanaArcPolygonArbitrumWorld Chain+1Answering
POSThttps://api.fadeandco.workers.dev/api/agent-intel/agent-json-schema-guard

Uptime100% of 3 checks in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://api.fadeandco.workers.dev/api/agent-intel/agent-json-schema-guard", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"schema":{"additionalProperties":false,"properties":{"age":{"minimum":0,"type":"integer"},"name":{"maxLength":40,"type":"string"}},"required":["name"],"type":"object"},"value":{"age":36,"extra":"remove me","name":"Ada"}}),
});
console.log(await res.json());

Example input

{
  "schema": {
    "additionalProperties": false,
    "properties": {
      "age": {
        "minimum": 0,
        "type": "integer"
      },
      "name": {
        "maxLength": 40,
        "type": "string"
      }
    },
    "required": [
      "name"
    ],
    "type": "object"
  },
  "value": {
    "age": 36,
    "extra": "remove me",
    "name": "Ada"
  }
}

More from SiteCheck Agent Intel & DevProvider status