For the complete BrainAPI documentation index, see llms.txt. A markdown version of any docs page is available by appending .md to its URL. Docs MCP: /docs/mcp.
BrainAPI Model API
Create and update typed entities and relationships.
Create a new entity (node) in the knowledge graph.
Returns: Response payload containing details of the created node.
BrainAPI personal access token.
In: header
Header Parameters
Preferred brain scope. Query/body/multipart fallbacks remain supported.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request model for adding a new entity to the graph.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/model/entity" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'[ { "description": "string", "happened_at": "string", "labels": [ "string" ], "last_updated": "2019-08-24T14:15:22Z", "metadata": {}, "name": "string", "observations": [ { "id": "string", "inserted_at": "2019-08-24T14:15:22Z", "metadata": {}, "resource_id": "string", "text": "string" } ], "polarity": "neutral", "properties": {}, "uuid": "string" }]Update an entity (node) in the graph.
@returns The controller's response containing the updated node representation or an operation result.
BrainAPI personal access token.
In: header
Header Parameters
Preferred brain scope. Query/body/multipart fallbacks remain supported.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request model for updating an existing entity in the graph.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/model/entity" \ -H "Content-Type: application/json" \ -d '{ "uuid": "string" }'{ "description": "string", "happened_at": "string", "labels": [ "string" ], "last_updated": "2019-08-24T14:15:22Z", "metadata": {}, "name": "string", "observations": [ { "id": "string", "inserted_at": "2019-08-24T14:15:22Z", "metadata": {}, "resource_id": "string", "text": "string" } ], "polarity": "neutral", "properties": {}, "uuid": "string"}Create a relationship linking two nodes in the graph.
Returns: relationship (dict): Representation of the created relationship.
BrainAPI personal access token.
In: header
Header Parameters
Preferred brain scope. Query/body/multipart fallbacks remain supported.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request model for adding a new relationship between two entities.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/model/relationship" \ -H "Content-Type: application/json" \ -d '{ "object_uuid": "string", "predicate_description": "string", "predicate_name": "string", "subject_uuid": "string" }'"string"Update properties of an existing relationship.
Uses the following fields from request: uuid, brain_id, new_properties (defaults to an empty dict if missing), and properties_to_remove (defaults to an empty list if missing).
Returns: The updated relationship representation or a result object describing the outcome of the update.
BrainAPI personal access token.
In: header
Header Parameters
Preferred brain scope. Query/body/multipart fallbacks remain supported.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request model for updating an existing relationship's properties.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/model/relationship" \ -H "Content-Type: application/json" \ -d '{ "uuid": "string" }'{ "amount": 0, "deprecated": false, "description": "string", "direction": "neutral", "flow_key": "string", "last_updated": "2019-08-24T14:15:22Z", "level": "1", "name": "string", "observations": [ { "id": "string", "inserted_at": "2019-08-24T14:15:22Z", "metadata": {}, "resource_id": "string", "text": "string" } ], "properties": {}, "uuid": "string"}Last updated on
