API Integration Intelligence API Documentation

Validate supplied payloads against supplied contracts, map fields that exist on both sides, and apply a documented set of JSON transforms. Payment is the exact USDC price on Base with x402.

POSThttps://brainiac.software/api/v1/api-integration/json-schema-generate$0.04 USDC

Generate a JSON schema

Build a schema from supplied examples. Required properties are keys present on every example. Whole numbers are integer. Additional properties stay allowed.

Body

FieldRequiredNotes
payloadNo—
exampleNo—
examplesNoarray; Array
schemaNo—
sourceNo—
targetNo—
beforeNo—
afterNo—
jsonNostring
fileNoobject; Object
operationsNoarray; Array
sideNostring; One of: request, response
fromVersionNostring
toVersionNostring

Request exampleJSON

{
  "example": {
    "id": "ord_1",
    "email": "ada@example.com",
    "total": 12,
    "items": [
      {
        "sku": "press",
        "qty": 1
      }
    ]
  }
}

Response exampleJSON

{
  "checkedAt": "2026-11-03T15:00:00.000Z",
  "codeExecuted": false,
  "externalCall": false,
  "valuesInvented": false,
  "schemaCompliance": false,
  "status": "generated",
  "schemaGenerated": true,
  "schema": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string"
      },
      "email": {
        "type": "string"
      },
      "total": {
        "type": "integer"
      },
      "items": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "sku": {
              "type": "string"
            },
            "qty": {
              "type": "integer"
            }
          },
          "required": [
            "sku",
            "qty"
          ],
          "additionalProperties": true
        }
      }
    },
    "required": [
      "id",
      "email",
      "total",
      "items"
    ],
    "additionalProperties": true
  },
  "issues": [],
  "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."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/api-integration/json-schema-generate" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "example": {
    "id": "ord_1",
    "email": "ada@example.com",
    "total": 12,
    "items": [
      {
        "sku": "press",
        "qty": 1
      }
    ]
  }
}
JSON
POSThttps://brainiac.software/api/v1/api-integration/json-schema-validate$0.04 USDC

Validate a payload

Check a payload against a supplied schema using the documented subset. Each failure has a JSON pointer. Unsupported keywords are reported and not applied.

Body

FieldRequiredNotes
payloadNo—
exampleNo—
examplesNoarray; Array
schemaNo—
sourceNo—
targetNo—
beforeNo—
afterNo—
jsonNostring
fileNoobject; Object
operationsNoarray; Array
sideNostring; One of: request, response
fromVersionNostring
toVersionNostring

Request exampleJSON

{
  "schema": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string"
      },
      "total": {
        "type": "number"
      }
    },
    "required": [
      "id",
      "total"
    ],
    "additionalProperties": false
  },
  "payload": {
    "id": 1,
    "note": "extra"
  }
}

Response exampleJSON

{
  "checkedAt": "2026-11-03T15:00:00.000Z",
  "codeExecuted": false,
  "externalCall": false,
  "valuesInvented": false,
  "schemaCompliance": false,
  "status": "invalid",
  "issues": [
    {
      "kind": "missing",
      "code": "required_missing",
      "path": "/total",
      "keyword": "required",
      "detail": "This required property is absent. No value was invented."
    },
    {
      "kind": "conflict",
      "code": "type_mismatch",
      "path": "/id",
      "keyword": "type",
      "detail": "The value is number. The schema allows string."
    },
    {
      "kind": "conflict",
      "code": "additional_property",
      "path": "/note",
      "keyword": "additionalProperties",
      "detail": "This property is not in the schema. It was not removed."
    }
  ],
  "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."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/api-integration/json-schema-validate" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "schema": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string"
      },
      "total": {
        "type": "number"
      }
    },
    "required": [
      "id",
      "total"
    ],
    "additionalProperties": false
  },
  "payload": {
    "id": 1,
    "note": "extra"
  }
}
JSON
POSThttps://brainiac.software/api/v1/api-integration/response-normalize$0.03 USDC

Normalize an API response

Trim string edges and sort object keys. Types are not changed, fields are not removed, and each change is listed.

Body

FieldRequiredNotes
payloadNo—
exampleNo—
examplesNoarray; Array
schemaNo—
sourceNo—
targetNo—
beforeNo—
afterNo—
jsonNostring
fileNoobject; Object
operationsNoarray; Array
sideNostring; One of: request, response
fromVersionNostring
toVersionNostring

Request exampleJSON

{
  "payload": {
    "b": " x ",
    "a": 1
  }
}

Response exampleJSON

{
  "checkedAt": "2026-11-03T15:00:00.000Z",
  "codeExecuted": false,
  "externalCall": false,
  "valuesInvented": false,
  "schemaCompliance": false,
  "status": "normalized",
  "result": {
    "a": 1,
    "b": "x"
  },
  "changedCount": 2,
  "changes": [
    {
      "path": "/",
      "rule": "sort_keys",
      "original": "b,a",
      "normalized": "a,b"
    },
    {
      "path": "/b",
      "rule": "trim",
      "original": "\" x \"",
      "normalized": "\"x\""
    }
  ],
  "issues": [],
  "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."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/api-integration/response-normalize" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "payload": {
    "b": " x ",
    "a": 1
  }
}
JSON
POSThttps://brainiac.software/api/v1/api-integration/payload-transform$0.05 USDC

Transform a payload

Apply rename, copy, pick, omit, cast, and default in order. A missing source is reported and not invented. A default is written only when the path is absent.

Body

FieldRequiredNotes
payloadNo—
exampleNo—
examplesNoarray; Array
schemaNo—
sourceNo—
targetNo—
beforeNo—
afterNo—
jsonNostring
fileNoobject; Object
operationsNoarray; Array
sideNostring; One of: request, response
fromVersionNostring
toVersionNostring

Request exampleJSON

{
  "payload": {
    "orderId": "ord_1",
    "email": "Ada@example.com"
  },
  "operations": [
    {
      "op": "rename",
      "from": "orderId",
      "to": "id"
    },
    {
      "op": "default",
      "path": "status",
      "value": "open"
    }
  ]
}

Response exampleJSON

{
  "checkedAt": "2026-11-03T15:00:00.000Z",
  "codeExecuted": false,
  "externalCall": false,
  "valuesInvented": false,
  "schemaCompliance": false,
  "status": "transformed",
  "result": {
    "email": "Ada@example.com",
    "id": "ord_1",
    "status": "open"
  },
  "changedCount": 2,
  "changes": [
    {
      "path": "/id",
      "rule": "rename",
      "original": "",
      "normalized": "\"ord_1\""
    },
    {
      "path": "/status",
      "rule": "default",
      "original": "",
      "normalized": "\"open\""
    }
  ],
  "issues": [],
  "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."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/api-integration/payload-transform" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "payload": {
    "orderId": "ord_1",
    "email": "Ada@example.com"
  },
  "operations": [
    {
      "op": "rename",
      "from": "orderId",
      "to": "id"
    },
    {
      "op": "default",
      "path": "status",
      "value": "open"
    }
  ]
}
JSON
POSThttps://brainiac.software/api/v1/api-integration/field-map-generate$0.05 USDC

Generate a field map

Map a path that exists on both sides, or a field name that matches one leaf on each side after splitting camel case and snake case. No value is copied.

Body

FieldRequiredNotes
payloadNo—
exampleNo—
examplesNoarray; Array
schemaNo—
sourceNo—
targetNo—
beforeNo—
afterNo—
jsonNostring
fileNoobject; Object
operationsNoarray; Array
sideNostring; One of: request, response
fromVersionNostring
toVersionNostring

Request exampleJSON

{
  "source": {
    "orderId": "ord_1",
    "customer": {
      "emailAddress": "ada@example.com"
    }
  },
  "target": {
    "order_id": "x",
    "customer": {
      "email_address": "y"
    },
    "note": "n"
  }
}

Response exampleJSON

{
  "checkedAt": "2026-11-03T15:00:00.000Z",
  "codeExecuted": false,
  "externalCall": false,
  "valuesInvented": false,
  "schemaCompliance": false,
  "status": "mapped",
  "valuesCopied": false,
  "mappings": [
    {
      "sourcePath": "/",
      "targetPath": "/",
      "match": "path",
      "sourceType": "object",
      "targetType": "object",
      "compatible": true
    },
    {
      "sourcePath": "/customer",
      "targetPath": "/customer",
      "match": "path",
      "sourceType": "object",
      "targetType": "object",
      "compatible": true
    },
    {
      "sourcePath": "/orderId",
      "targetPath": "/order_id",
      "match": "name",
      "sourceType": "string",
      "targetType": "string",
      "compatible": true
    },
    {
      "sourcePath": "/customer/emailAddress",
      "targetPath": "/customer/email_address",
      "match": "name",
      "sourceType": "string",
      "targetType": "string",
      "compatible": true
    }
  ],
  "unmappedSource": [],
  "unmappedTarget": [
    {
      "path": "/note",
      "type": "string"
    }
  ],
  "issues": [],
  "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."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/api-integration/field-map-generate" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "source": {
    "orderId": "ord_1",
    "customer": {
      "emailAddress": "ada@example.com"
    }
  },
  "target": {
    "order_id": "x",
    "customer": {
      "email_address": "y"
    },
    "note": "n"
  }
}
JSON
POSThttps://brainiac.software/api/v1/api-integration/contract-compare$0.05 USDC

Compare API contracts

List schema changes. A change is labeled breaking or non-breaking only when side is request or response. Title and description are ignored.

Body

FieldRequiredNotes
payloadNo—
exampleNo—
examplesNoarray; Array
schemaNo—
sourceNo—
targetNo—
beforeNo—
afterNo—
jsonNostring
fileNoobject; Object
operationsNoarray; Array
sideNostring; One of: request, response
fromVersionNostring
toVersionNostring

Request exampleJSON

{
  "side": "response",
  "before": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string"
      },
      "total": {
        "type": "number"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": true
  },
  "after": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string"
      },
      "total": {
        "type": "integer"
      }
    },
    "required": [
      "id",
      "total"
    ],
    "additionalProperties": true
  }
}

Response exampleJSON

{
  "checkedAt": "2026-11-03T15:00:00.000Z",
  "codeExecuted": false,
  "externalCall": false,
  "valuesInvented": false,
  "schemaCompliance": false,
  "status": "compared",
  "side": "response",
  "changes": [
    {
      "path": "/total",
      "code": "required_added",
      "effect": "breaking",
      "before": "",
      "after": "total",
      "detail": "This property is newly required."
    },
    {
      "path": "/total",
      "code": "type_changed",
      "effect": "breaking",
      "before": "number",
      "after": "integer",
      "detail": "The type allows fewer values."
    }
  ],
  "issues": [],
  "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."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/api-integration/contract-compare" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "side": "response",
  "before": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string"
      },
      "total": {
        "type": "number"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": true
  },
  "after": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string"
      },
      "total": {
        "type": "integer"
      }
    },
    "required": [
      "id",
      "total"
    ],
    "additionalProperties": true
  }
}
JSON
POSThttps://brainiac.software/api/v1/api-integration/version-compatibility-check$0.04 USDC

Check version compatibility

Order dotted numeric versions and compare the supplied schemas. A version number alone is not treated as compatible. The payload is checked against the later schema.

Body

FieldRequiredNotes
payloadNo—
exampleNo—
examplesNoarray; Array
schemaNo—
sourceNo—
targetNo—
beforeNo—
afterNo—
jsonNostring
fileNoobject; Object
operationsNoarray; Array
sideNostring; One of: request, response
fromVersionNostring
toVersionNostring

Request exampleJSON

{
  "side": "response",
  "fromVersion": "1.2.0",
  "toVersion": "1.3.0",
  "before": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string"
      },
      "total": {
        "type": "number"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": true
  },
  "after": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string"
      },
      "total": {
        "type": "integer"
      }
    },
    "required": [
      "id",
      "total"
    ],
    "additionalProperties": true
  },
  "payload": {
    "id": "ord_1",
    "total": 12.5
  }
}

Response exampleJSON

{
  "checkedAt": "2026-11-03T15:00:00.000Z",
  "codeExecuted": false,
  "externalCall": false,
  "valuesInvented": false,
  "schemaCompliance": false,
  "status": "incompatible",
  "fromVersion": "1.2.0",
  "toVersion": "1.3.0",
  "order": "newer",
  "compatible": false,
  "payloadStatus": "invalid",
  "changes": [
    {
      "path": "/total",
      "code": "required_added",
      "effect": "breaking",
      "before": "",
      "after": "total",
      "detail": "This property is newly required."
    },
    {
      "path": "/total",
      "code": "type_changed",
      "effect": "breaking",
      "before": "number",
      "after": "integer",
      "detail": "The type allows fewer values."
    }
  ],
  "issues": [
    {
      "kind": "conflict",
      "code": "type_mismatch",
      "path": "/total",
      "keyword": "type",
      "detail": "The value is number. The schema allows integer."
    }
  ],
  "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."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/api-integration/version-compatibility-check" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "side": "response",
  "fromVersion": "1.2.0",
  "toVersion": "1.3.0",
  "before": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string"
      },
      "total": {
        "type": "number"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": true
  },
  "after": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string"
      },
      "total": {
        "type": "integer"
      }
    },
    "required": [
      "id",
      "total"
    ],
    "additionalProperties": true
  },
  "payload": {
    "id": "ord_1",
    "total": 12.5
  }
}
JSON
POSThttps://brainiac.software/api/v1/api-integration/diagnose$0.12 USDC

Diagnose an integration

Generate a schema from examples, validate the payload, map fields that exist, compare contracts, and apply documented transforms. No external API is called.

Body

FieldRequiredNotes
payloadNo—
exampleNo—
examplesNoarray; Array
schemaNo—
sourceNo—
targetNo—
beforeNo—
afterNo—
jsonNostring
fileNoobject; Object
operationsNoarray; Array
sideNostring; One of: request, response
fromVersionNostring
toVersionNostring

Request exampleJSON

{
  "side": "response",
  "fromVersion": "1.2.0",
  "toVersion": "1.3.0",
  "example": {
    "orderId": "ord_1",
    "total": 12
  },
  "payload": {
    "orderId": "ord_1"
  },
  "before": {
    "type": "object",
    "properties": {
      "orderId": {
        "type": "string"
      },
      "total": {
        "type": "number"
      }
    },
    "required": [
      "orderId"
    ],
    "additionalProperties": true
  },
  "after": {
    "type": "object",
    "properties": {
      "orderId": {
        "type": "string"
      },
      "total": {
        "type": "integer"
      }
    },
    "required": [
      "orderId",
      "total"
    ],
    "additionalProperties": true
  },
  "source": {
    "orderId": "ord_1",
    "total": 12
  },
  "target": {
    "order_id": "ord_1",
    "total": 1
  },
  "operations": [
    {
      "op": "rename",
      "from": "orderId",
      "to": "id"
    }
  ]
}

Response exampleJSON

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

cURL

curl -i -X POST "https://brainiac.software/api/v1/api-integration/diagnose" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "side": "response",
  "fromVersion": "1.2.0",
  "toVersion": "1.3.0",
  "example": {
    "orderId": "ord_1",
    "total": 12
  },
  "payload": {
    "orderId": "ord_1"
  },
  "before": {
    "type": "object",
    "properties": {
      "orderId": {
        "type": "string"
      },
      "total": {
        "type": "number"
      }
    },
    "required": [
      "orderId"
    ],
    "additionalProperties": true
  },
  "after": {
    "type": "object",
    "properties": {
      "orderId": {
        "type": "string"
      },
      "total": {
        "type": "integer"
      }
    },
    "required": [
      "orderId",
      "total"
    ],
    "additionalProperties": true
  },
  "source": {
    "orderId": "ord_1",
    "total": 12
  },
  "target": {
    "order_id": "ord_1",
    "total": 1
  },
  "operations": [
    {
      "op": "rename",
      "from": "orderId",
      "to": "id"
    }
  ]
}
JSON