# BRAINIAC API Integration Diagnose

> BRAINIAC API Integration Diagnose is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.12/call, status unknown (last checked 2026-11-17).

Validates, diagnoses, and transforms JSON API payloads against a schema, detecting compatibility issues, field mappings, and contract changes between versions

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/api-integration/diagnose?utm_source=zero.xyz
- Price: $0.12/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-api-integration-diagnose-7d42038f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xlBvqDmM7OQP-5uOUQmK5

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-api-integration-diagnose-7d42038f -d '<json body>'
```

Example prompt: Diagnose this API response body against its schema — the response side — and tell me if there are any missing required fields or type mismatches: the payload is {"id":"ord_1"} and the schema requires both orderId (string) and total (integer).

## When to prefer this

Use this endpoint when you need to validate, diagnose, or transform a JSON payload against a schema without spinning up external infrastructure or writing custom validation code. It is especially useful for detecting breaking API contract changes between versions, mapping fields across different schemas, or applying structural transforms (rename, copy, pick, omit, cast, default) to a payload. Prefer it over generic JSON validators when you also need field mapping analysis, transform operations, or contract change classification (breaking vs non-breaking).

## Known failure modes

- Invalid or malformed JSON input returns a parsing error
- Schema references unsupported JSON Schema keywords — these are reported but not enforced
- Field mapping proposed only when path or name matches one field on each side — complex mappings may be missed
- Generated schema from examples only uses observed values; additionalProperties stays true
- Breaking/non-breaking labels only returned when side is request or response — omitting side skips that analysis
- Base64-encoded file payload exceeding 12MB limit returns size error
- Enum or format constraints beyond (email, date, date-time) are reported but not validated

## 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 diagnosis object containing: a list of validation issues (with code, kind, path, and detail), field mappings between source and target, applied schema transformations, contract change list with breaking/non-breaking labels, compatibility status, the normalized/transformed result, the inferred or applied schema, and metadata flags (codeExecuted, externalCall, valuesInvented, valuesCopied).

## 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": {
  "order": "newer",
  "issues": [
   {
    "code": "required_missing",
    "kind": "missing",
    "path": "/total",
    "detail": "This required property is absent. No value was invented.",
    "keyword": "required"
   }
  ],
  "result": {
   "id": "ord_1"
  },
  "schema": {
   "type": "object",
   "required": [
    "orderId",
    "total"
   ],
   "properties": {
    "total": {
     "type": "integer"
    },
    "orderId": {
     "type": "string"
    }
   },
   "additionalProperties": true
  },
  "status": "diagnosed",
  "changes": [
   {
    "path": "/id",
    "rule": "rename",
    "original": "",
    "normalized": "\"ord_1\""
   }
  ],
  "mappings": [
   {
    "match": "path",
    "compatible": true,
    "sourcePath": "/",
    "sourceType": "object",
    "targetPath": "/",
    "targetType": "object"
   },
   {
    "match": "path",
    "compatible": true,
    "sourcePath": "/total",
    "sourceType": "integer",
    "targetPath": "/total",
    "targetType": "integer"
   },
   {
    "match": "name",
    "compatible": true,
    "sourcePath": "/orderId",
    "sourceType": "string",
    "targetPath": "/order_id",
    "targetType": "string"
   }
  ],
  "checkedAt": "2026-11-03T15:00:00.000Z",
  "compatible": false,
  "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."
  ],
  "transformed": true,
  "codeExecuted": false,
  "externalCall": false,
  "valuesCopied": false,
  "valuesInvented": false,
  "contractChanges": [
   {
    "code": "required_added",
    "path": "/total",
    "after": "total",
    "before": "",
    "detail": "This property is newly required.",
    "effect": "breaking"
   },
   {
    "code": "type_changed",
    "path": "/total",
    "after": "integer",
    "before": "number",
    "detail": "The type allows fewer values.",
    "effect": "breaking"
   }

… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-api-integration-diagnose-7d42038f/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)
