# 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-17).

Generates a JSON Schema from one or more JSON examples or raw JSON input, with optional validation, field mapping, and schema transformation operations

## Facts

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

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-c8d1b5ec -d '<json body>'
```

Example prompt: Take this JSON example — {"id":"abc123","email":"user@example.com","total":99,"items":[{"sku":"SHOE-7","qty":2}]} — and generate a JSON Schema for it, treating it as a response payload.

## When to prefer this

Choose this endpoint when you need to programmatically infer a JSON Schema from real JSON data without setting up an account or subscription. It is particularly well-suited for agents that need to auto-document API payloads, generate schemas on-the-fly from observed data, or apply lightweight schema transformation operations (rename, omit, cast, etc.) as part of an automated pipeline. It is not a full JSON Schema validator supporting all keywords, so prefer a dedicated validator for complex keyword coverage.

## Known failure modes

- Invalid or malformed JSON input returns validation issues in the issues array
- Exceeding the maxLength limits on json (200000 chars) or file base64 (12MB) may cause rejection
- Unsupported mediaType for file input (must be application/json or text/plain)
- Conflicting field types across multiple examples may produce a schema with broader types and noted limitations
- Operations referencing non-existent paths may silently produce incomplete transforms
- x402 payment failure (insufficient USDC balance or wrong network) blocks the call entirely

## How this service works

Pay-per-call APIs for software agents. No account. Pay the listed USDC amount on Base with x402, then receive the result.

## Output

Returns a JSON object containing: a generated JSON Schema reflecting the structure inferred from the input examples, a list of validation issues (empty if clean), a status field ('generated'), a checkedAt timestamp, a list of limitations (e.g. which keywords are and aren't applied), and boolean flags confirming no external calls were made, no values were invented, and no code was executed.

## 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": {
   "$ref": "#/$defs/__schema0"
  },
  "before": {
   "$ref": "#/$defs/__schema0"
  },
  "schema": {
   "$ref": "#/$defs/__schema0"
  },
  "source": {
   "$ref": "#/$defs/__schema0"
  },
  "target": {
   "$ref": "#/$defs/__schema0"
  },
  "example": {
   "$ref": "#/$defs/__schema0"
  },
  "payload": {
   "$ref": "#/$defs/__schema0"
  },
  "examples": {
   "type": "array",
   "items": {
    "$ref": "#/$defs/__schema0"
   },
   "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
        },
        
… (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-c8d1b5ec/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)
