# BRAINIAC JSON Schema Generator

> BRAINIAC JSON Schema Generator is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.04/call, status unknown (last checked 2026-11-12).

Generates a JSON Schema from one or more JSON examples or payloads, and can also validate, diff, map, and transform schemas

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/integration/json-schema-generate?utm_source=zero.xyz
- Price: $0.04/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-json-schema-generator-6ddc1b7c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_g0zBOX_G2blxpIebewUi3

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability brainiac-json-schema-generator-6ddc1b7c -d '<json body>'
```

Example prompt: Can you generate a JSON Schema from this example JSON I have — it's an order object with id, email, total, and an items array where each item has sku and qty fields?

## When to prefer this

Use this endpoint when you need to quickly infer a JSON Schema from one or more concrete JSON examples without writing schema by hand, or when you need to validate a JSON payload against a schema, diff two schemas, or propose field mappings between schemas. Prefer this over manual schema writing or general-purpose LLM schema generation when you want a deterministic, structured result with explicit limitation disclosures and no invented values.

## Known failure modes

- Input JSON is malformed or unparseable — returns issues listing parse errors
- File base64 is too large (>12MB) or media type is unsupported — returns validation error
- No JSON input or file provided — returns error requiring at least one input source
- Schema keywords outside the supported subset (type, properties, required, additionalProperties, items, enum, const, length, range, email/date/date-time formats) are reported but not applied
- Field mapping proposed only when path or field name uniquely matches one field on each side — ambiguous mappings may be omitted

## How this service works

Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.

## Output

Returns a generated JSON Schema inferred from the supplied examples, along with a list of any compliance issues, metadata about what was and wasn't applied (supported keywords, limitations), and flags indicating whether external calls or code execution occurred. The status field indicates whether a schema was generated and whether the input was compliant.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "file": {
   "type": "object",
   "required": [
    "mediaType",
    "fileBase64"
   ],
   "properties": {
    "filename": {
     "type": "string",
     "maxLength": 180,
     "minLength": 1
    },
    "mediaType": {
     "enum": [
      "application/json",
      "text/plain"
     ],
     "type": "string"
    },
    "fileBase64": {
     "type": "string",
     "maxLength": 12000000,
     "minLength": 1
    }
   },
   "additionalProperties": false
  },
  "json": {
   "type": "string",
   "maxLength": 200000
  },
  "side": {
   "enum": [
    "request",
    "response"
   ],
   "type": "string"
  },
  "after": {},
  "before": {},
  "schema": {},
  "source": {},
  "target": {},
  "example": {},
  "payload": {},
  "examples": {
   "type": "array",
   "items": {},
   "maxItems": 20
  },
  "toVersion": {
   "type": "string",
   "maxLength": 40,
   "minLength": 1
  },
  "operations": {
   "type": "array",
   "items": {
    "oneOf": [
     {
      "type": "object",
      "required": [
       "op",
       "from",
       "to"
      ],
      "properties": {
       "op": {
        "type": "string",
        "const": "rename"
       },
       "to": {
        "type": "string",
        "maxLength": 200,
        "minLength": 1
       },
       "from": {
        "type": "string",
        "maxLength": 200,
        "minLength": 1
       }
      },
      "additionalProperties": false
     },
     {
      "type": "object",
      "required": [
       "op",
       "from",
       "to"
      ],
      "properties": {
       "op": {
        "type": "string",
        "const": "copy"
       },
       "to": {
        "type": "string",
        "maxLength": 200,
        "minLength": 1
       },
       "from": {
        "type": "string",
        "maxLength": 200,
        "minLength": 1
       }
      },
      "additionalProperties": false
     },
     {
      "type": "object",
      "required": [
       "op",
       "paths"
      ],
      "properties": {
       "op": {
        "type": "string",
        "const": "pick"
       },
       "paths": {
        "type": "array",
        "items": {
         "type": "string",
         "maxLength": 200,
         "minLength": 1
        },
        "maxItems": 40,
        "minItems": 1
       }
      },
      "additionalProperties": false
     },
     {
      "type": "object",
      "required": [
       "op",
       "paths"
      ],
      "properties": {
       "op": {
        "type": "string",
        "const": "omit"
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "issues": [],
  "schema": {
   "type": "object",
   "required": [
    "id",
    "email",
    "total",
    "items"
   ],
   "properties": {
    "id": {
     "type": "string"
    },
    "email": {
     "type": "string"
    },
    "items": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "sku",
       "qty"
      ],
      "properties": {
       "qty": {
        "type": "integer"
       },
       "sku": {
        "type": "string"
       }
      },
      "additionalProperties": true
     }
    },
    "total": {
     "type": "integer"
    }
   },
   "additionalProperties": true
  },
  "status": "generated",
  "checkedAt": "2026-11-03T15:00:00.000Z",
  "limitations": [
   "No external API is called and no user-supplied code is executed.",
   "Validation covers type, properties, required, additionalProperties, items, enum, const, length, range, and the formats email, date, and date-time. Other JSON Schema keywords are reported and not applied.",
   "A generated schema uses only values present in the supplied examples. additionalProperties stays true.",
   "A field mapping is proposed only when the path matches or the field name matches one field on each side.",
   "Breaking and non-breaking labels are returned only when side is request or response.",
   "Transforms are rename, copy, pick, omit, cast, and default. A default is written only when the path is absent."
  ],
  "codeExecuted": false,
  "externalCall": false,
  "valuesInvented": false,
  "schemaGenerated": true,
  "schemaCompliance": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-json-schema-generator-6ddc1b7c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.brainiac.software](https://www.zero.xyz/host/www.brainiac.software/llms.txt)
