{
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "SyncPayload": {
        "properties": {
          "ceiba": {
            "title": "Ceiba",
            "type": "string"
          },
          "connectors": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connectors"
          },
          "entity": {
            "additionalProperties": true,
            "title": "Entity",
            "type": "object"
          },
          "entity_type": {
            "title": "Entity Type",
            "type": "string"
          }
        },
        "required": [
          "ceiba",
          "entity_type",
          "entity"
        ],
        "title": "SyncPayload",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "ctx": {
            "title": "Context",
            "type": "object"
          },
          "input": {
            "title": "Input"
          },
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      }
    }
  },
  "info": {
    "contact": {
      "email": "hola@koalabs.ai",
      "name": "KOA Labs",
      "url": "https://ceiba.to/"
    },
    "description": "Read API of a ceiba node (the INE interpreter node). Generated from the code in 05_services/ceiba-node/backend/main.py; only endpoints that exist are listed. A node serves these paths on its own host; ceiba.to itself is the protocol site, not a node.",
    "title": "ceiba-node",
    "version": "0.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/.well-known/ceiba": {
      "get": {
        "operationId": "well_known_ceiba__well_known_ceiba_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Well Known Ceiba"
      }
    },
    "/ceiba.json": {
      "get": {
        "operationId": "ceiba_manifest_ceiba_json_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Ceiba Manifest"
      }
    },
    "/health": {
      "get": {
        "operationId": "health_health_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Health"
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "llms_txt_llms_txt_get",
        "responses": {
          "200": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Llms Txt"
      }
    },
    "/v1/entities": {
      "get": {
        "description": "List all entities across all registered ceibas.",
        "operationId": "list_entities_v1_entities_get",
        "parameters": [
          {
            "description": "Filter by ceiba name",
            "in": "query",
            "name": "ceiba",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by ceiba name",
              "title": "Ceiba"
            }
          },
          {
            "description": "Filter by entity type",
            "in": "query",
            "name": "entity_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by entity type",
              "title": "Entity Type"
            }
          },
          {
            "description": "Search in body JSON",
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Search in body JSON",
              "title": "Search"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Entities"
      }
    },
    "/v1/graph": {
      "get": {
        "description": "Return the full entity graph: nodes (entities) + edges (connectors).",
        "operationId": "entity_graph_v1_graph_get",
        "parameters": [
          {
            "description": "Filter by ceiba",
            "in": "query",
            "name": "ceiba",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by ceiba",
              "title": "Ceiba"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Entity Graph"
      }
    },
    "/v1/nodes": {
      "get": {
        "description": "List registered ceiba nodes and their sync status.",
        "operationId": "list_nodes_v1_nodes_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "List Nodes"
      }
    },
    "/v1/registry/nodes": {
      "get": {
        "description": "Discovery endpoint (Ceiba v0.6 governance).\n\nReturns one entry per known ceiba node with stable shape:\n    {\n      node_did, url, karma, last_seen, entity_count, status,\n      uptime_30d, x402_currency, x402_price_per_sync\n    }\n\nKarma and uptime_30d are derived from local sync telemetry (status==active\ncounts toward uptime; entity_count + recency feed karma). x402_* fields are\nnull unless the peer's did.json declares pricing AND probe_x402=true is\npassed.\n\nBackward-compat note: the simpler /v1/nodes endpoint is preserved.",
        "operationId": "registry_nodes_v1_registry_nodes_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 500,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "description": "Filter by sync status",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by sync status",
              "title": "Status"
            }
          },
          {
            "description": "Best-effort probe peers' did.json for x402 pricing (adds latency)",
            "in": "query",
            "name": "probe_x402",
            "required": false,
            "schema": {
              "default": false,
              "description": "Best-effort probe peers' did.json for x402 pricing (adds latency)",
              "title": "Probe X402",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Registry Nodes"
      }
    },
    "/v1/sync": {
      "post": {
        "description": "Receive a ciempiés entity pushed from another node.\nStores entity and optional connectors.",
        "operationId": "receive_entity_v1_sync_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SyncPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Receive Entity"
      }
    },
    "/v1/sync/trigger": {
      "post": {
        "description": "Manually trigger a full sync from all registered ceibas.",
        "operationId": "trigger_sync_v1_sync_trigger_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Trigger Sync"
      }
    }
  }
}
