{
  "openapi": "3.1.0",
  "info": {
    "title": "NeuraNidus Public Discovery, NLWeb & Agent Preflight API",
    "version": "2026-11-01",
    "summary": "Zero-authentication REST v1 and NLWeb v0.55 API for NeuraNidus UG corporate metadata, Nidal Apache-2.0 licensing, grounded site search (JSON + SSE), cursor-paginated pages, inquiry validation, and asynchronous corpus exports.",
    "description": "Public machine-readable REST API for **NeuraNidus UG (haftungsbeschränkt)** (`https://neuranidus.com`).\n\n### Authentication & Access\nAll endpoints are **public and keyless (`security: []`)**—no API key, OAuth client, or signup is required.\n\n### API Versioning & Deprecation Policy\n- **URL Major Versioning**: Stable endpoints are served under `/api/v1/...` alongside date-stamped header `API-Version: 2026-11-01`.\n- **Non-Breaking Evolution**: Additive optional fields and new endpoints are released in-place under `/api/v1`.\n- **Deprecation & Sunset**: Any retiring endpoint or field emits RFC 8594 `Deprecation` and `Sunset` HTTP headers at least **180 days** prior to removal, with migration links in `Link: <https://neuranidus.com/docs#versioning>; rel=\"deprecation\"`.\n\n### Rate Limits\nEvery response includes IETF `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset`, and `RateLimit-Policy` headers (`120` requests per `60` seconds per client IP as a best-effort per-worker sliding window, paired with Azure Static Web Apps edge throttling), plus `Retry-After` on HTTP `429`.\n\n### Sandbox Environment\nAgents can exercise deterministic test fixtures without affecting live metrics via `/api/sandbox/v1/...` or by sending `X-Sandbox-Mode: true` (`?sandbox=true`).",
    "contact": {
      "name": "NeuraNidus UG (haftungsbeschränkt)",
      "url": "https://neuranidus.com/contact",
      "email": "contact@neuranidus.com"
    },
    "license": {
      "name": "Apache-2.0",
      "identifier": "Apache-2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    }
  },
  "externalDocs": {
    "description": "NeuraNidus API & MCP Documentation",
    "url": "https://neuranidus.com/docs"
  },
  "servers": [
    {
      "url": "https://neuranidus.com/api",
      "description": "Production API (keyless public read, NLWeb search, and preflight endpoints)"
    },
    {
      "url": "https://neuranidus.com/api/sandbox",
      "description": "Sandbox test environment (deterministic synthetic request IDs, zero side effects)"
    }
  ],
  "security": [],
  "tags": [
    {
      "name": "NLWeb Search",
      "description": "NLWeb v0.55 natural-language search over NeuraNidus pages with grounded evidence spans and optional SSE streaming."
    },
    {
      "name": "Catalog",
      "description": "Cursor-paginated corporate, product, documentation, and legal page catalog."
    },
    {
      "name": "Inquiries",
      "description": "Idempotent preflight validation for human-confirmed contact inquiries."
    },
    {
      "name": "Exports",
      "description": "Asynchronous 202 Accepted corpus bundle jobs and status polling."
    }
  ],
  "paths": {
    "/v1/ask": {
      "get": {
        "operationId": "askNeuranidusGet",
        "tags": [
          "NLWeb Search"
        ],
        "summary": "Search NeuraNidus content via NLWeb v0.55 (GET)",
        "description": "Execute a grounded natural-language or keyword search across NeuraNidus corporate, Nidal licensing, legal, and API documentation pages. Set `streaming=true` for Server-Sent Events (`text/event-stream`).",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "description": "Natural-language question or search phrase (1 to 2000 characters).",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2000
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of ranked results to return (1 to 20, default 5).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 5
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque pagination cursor returned in `pagination.nextCursor`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "streaming",
            "in": "query",
            "required": false,
            "description": "When true, stream `start`, `result`, and `complete` events via `text/event-stream`.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "site",
            "in": "query",
            "required": false,
            "description": "Target domain scope (defaults to `neuranidus.com`).",
            "schema": {
              "type": "string",
              "default": "neuranidus.com"
            }
          },
          {
            "$ref": "#/components/parameters/SandboxHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Grounded NLWeb v0.55 search results (JSON or SSE stream when `streaming=true`).",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NlwebAnswerResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string",
                  "description": "NLWeb v0.55 Server-Sent Events stream (`event: start`, `event: result`, `event: complete`)."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NlwebBadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      },
      "post": {
        "operationId": "askNeuranidusPost",
        "tags": [
          "NLWeb Search"
        ],
        "summary": "Search NeuraNidus content via NLWeb v0.55 (POST)",
        "description": "Submit a structured NLWeb v0.55 query envelope with optional conversation context, cursor pagination, `Idempotency-Key` replay safety, and `prefer.streaming: true` SSE output.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/SandboxHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NlwebAskRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Grounded NLWeb v0.55 search results.",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "Idempotency-Key": {
                "$ref": "#/components/headers/IdempotencyKeyEcho"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NlwebAnswerResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string",
                  "description": "NLWeb v0.55 Server-Sent Events stream (`event: start`, `event: result`, `event: complete`)."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NlwebBadRequest"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/ask": {
      "get": {
        "operationId": "askNeuranidusAliasGet",
        "tags": [
          "NLWeb Search"
        ],
        "summary": "NLWeb v0.55 search alias (GET /api/ask)",
        "description": "Unversioned NLWeb v0.55 compatibility alias forwarding to the `/api/v1/ask` query handler.",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "description": "Natural-language question or search phrase (1 to 2000 characters).",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2000
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of ranked results to return (1 to 20, default 5).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 5
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque pagination cursor from `pagination.nextCursor`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "streaming",
            "in": "query",
            "required": false,
            "description": "Return Server-Sent Events when true.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Grounded NLWeb v0.55 search results.",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NlwebAnswerResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NlwebBadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "askNeuranidusAliasPost",
        "tags": [
          "NLWeb Search"
        ],
        "summary": "NLWeb v0.55 search alias (POST /api/ask)",
        "description": "Unversioned NLWeb v0.55 compatibility alias accepting standard NLWeb JSON payloads and optional SSE streaming.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NlwebAskRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Grounded NLWeb v0.55 search results.",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "Idempotency-Key": {
                "$ref": "#/components/headers/IdempotencyKeyEcho"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NlwebAnswerResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/NlwebBadRequest"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v1/pages": {
      "get": {
        "operationId": "listNeuranidusPages",
        "tags": [
          "Catalog"
        ],
        "summary": "List verified NeuraNidus pages and Markdown twins",
        "description": "Return a cursor-paginated list of public NeuraNidus HTML pages and their corresponding `.md` Markdown twins.",
        "parameters": [
          {
            "name": "section",
            "in": "query",
            "required": false,
            "description": "Filter pages by content section.",
            "schema": {
              "type": "string",
              "enum": [
                "company",
                "product",
                "docs",
                "legal"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size between 1 and 20 (default 5).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 5
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor from `pagination.nextCursor`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cursor-paginated list of published pages.",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v1/inquiries/validate": {
      "post": {
        "operationId": "validateContactInquiry",
        "tags": [
          "Inquiries"
        ],
        "summary": "Validate and stage a human-confirmed contact inquiry",
        "description": "Validate sender name, email address, topic category, and inquiry text, returning human-confirmation links (`mailto:` and `/contact`) without sending unsolicited email.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/SandboxHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InquiryValidateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Validated inquiry draft and human-confirmation instructions.",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "Idempotency-Key": {
                "$ref": "#/components/headers/IdempotencyKeyEcho"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InquiryValidateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v1/exports": {
      "post": {
        "operationId": "createCorpusExportJob",
        "tags": [
          "Exports"
        ],
        "summary": "Start an asynchronous Markdown corpus export job",
        "description": "Create an asynchronous corpus export job (`202 Accepted`) and return a `Location` header plus `statusUrl` for polling via `GET /api/v1/jobs/{jobId}`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/SandboxHeader"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExportJobCreateRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Export job accepted; poll `Location` / `statusUrl` for the completed bundle.",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "Location": {
                "description": "Polling URL for retrieving job status and completed bundle.",
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "Idempotency-Key": {
                "$ref": "#/components/headers/IdempotencyKeyEcho"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportJobAccepted"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v1/jobs/{jobId}": {
      "get": {
        "operationId": "getCorpusExportJob",
        "tags": [
          "Exports"
        ],
        "summary": "Poll status and retrieve completed corpus export job",
        "description": "Retrieve the status and full Markdown corpus bundle for an asynchronous export job created via `POST /api/v1/exports`.",
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "description": "Job identifier returned by `POST /api/v1/exports`.",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 64
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Export job status and completed Markdown bundle.",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportJobStatus"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "description": "Client-generated idempotency key (1 to 128 printable ASCII chars, such as a UUIDv4) to safely retry POST requests without duplicate processing.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        }
      },
      "SandboxHeader": {
        "name": "X-Sandbox-Mode",
        "in": "header",
        "required": false,
        "description": "Set to `true` to run the request in deterministic sandbox mode without touching live telemetry.",
        "schema": {
          "type": "boolean",
          "default": false
        }
      }
    },
    "headers": {
      "ApiVersion": {
        "description": "Active date-stamped API revision (`2026-11-01`).",
        "schema": {
          "type": "string",
          "example": "2026-11-01"
        }
      },
      "RateLimitLimit": {
        "description": "Maximum requests permitted in the current 60-second window.",
        "schema": {
          "type": "integer",
          "example": 120
        }
      },
      "RateLimitRemaining": {
        "description": "Remaining requests allowed in the current window.",
        "schema": {
          "type": "integer",
          "example": 119
        }
      },
      "RateLimitReset": {
        "description": "Seconds remaining until the rate-limit window resets.",
        "schema": {
          "type": "integer",
          "example": 60
        }
      },
      "RateLimitPolicy": {
        "description": "Active quota policy (`120;w=60`).",
        "schema": {
          "type": "string",
          "example": "120;w=60"
        }
      },
      "RetryAfter": {
        "description": "Seconds to wait before retrying after HTTP 429.",
        "schema": {
          "type": "integer",
          "example": 30
        }
      },
      "IdempotencyKeyEcho": {
        "description": "Echoed client `Idempotency-Key` when supplied.",
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "ApiError": {
        "type": "object",
        "description": "Machine-readable error object returned on all 4xx and 5xx responses.",
        "properties": {
          "code": {
            "type": "string",
            "description": "Stable uppercase error code.",
            "example": "MISSING_QUERY"
          },
          "message": {
            "type": "string",
            "description": "Human-readable explanation of what failed."
          },
          "status": {
            "type": "integer",
            "description": "HTTP status code.",
            "example": 400
          },
          "hint": {
            "type": "string",
            "description": "Actionable remediation guidance for agents and developers."
          },
          "requestId": {
            "type": "string",
            "description": "Unique correlation identifier for diagnostics."
          },
          "docsUrl": {
            "type": "string",
            "format": "uri",
            "description": "Documentation reference for error handling."
          }
        },
        "required": [
          "code",
          "message",
          "status",
          "hint",
          "requestId"
        ]
      },
      "ApiErrorEnvelope": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ApiError"
          },
          "issues": {
            "type": "array",
            "description": "Optional per-field validation details.",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "field",
                "message"
              ]
            }
          }
        },
        "required": [
          "error"
        ]
      },
      "PaginationMeta": {
        "type": "object",
        "description": "Cursor-based pagination metadata.",
        "properties": {
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20
          },
          "hasMore": {
            "type": "boolean"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Opaque cursor to pass as `cursor` on the next request, or `null` at the end of the list."
          },
          "totalCount": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "limit",
          "hasMore",
          "nextCursor"
        ]
      },
      "NlwebAskRequest": {
        "type": "object",
        "properties": {
          "query": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2000,
                "description": "Natural-language question or search query."
              },
              "site": {
                "type": "string",
                "default": "neuranidus.com",
                "description": "Domain filter."
              }
            },
            "required": [
              "text"
            ]
          },
          "context": {
            "type": "object",
            "description": "Optional NLWeb conversational context.",
            "additionalProperties": true
          },
          "prefer": {
            "type": "object",
            "properties": {
              "streaming": {
                "type": "boolean",
                "default": false,
                "description": "Set true to stream SSE events (`text/event-stream`)."
              },
              "response_format": {
                "type": "string",
                "enum": [
                  "conversational_search",
                  "list"
                ],
                "default": "conversational_search"
              },
              "mode": {
                "type": "string",
                "enum": [
                  "list",
                  "summarize",
                  "list, summarize"
                ],
                "default": "list"
              },
              "limit": {
                "type": "integer",
                "minimum": 1,
                "maximum": 20,
                "default": 5
              },
              "cursor": {
                "type": "string",
                "description": "Opaque cursor from `pagination.nextCursor`."
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "version": {
                "type": "string",
                "default": "0.55"
              },
              "request_id": {
                "type": "string",
                "maxLength": 64
              }
            }
          }
        },
        "required": [
          "query"
        ]
      },
      "NlwebEvidenceSpan": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "documentId": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "text": {
            "type": "string"
          },
          "start": {
            "type": "integer",
            "minimum": 0
          },
          "end": {
            "type": "integer",
            "minimum": 0
          },
          "view": {
            "type": "string",
            "enum": [
              "published",
              "sandbox"
            ]
          }
        },
        "required": [
          "id",
          "documentId",
          "url",
          "text",
          "start",
          "end",
          "view"
        ]
      },
      "NlwebResultItem": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "@type": {
                "type": "string",
                "const": "WebPage"
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "markdownUrl": {
                "type": "string",
                "format": "uri"
              },
              "name": {
                "type": "string"
              },
              "site": {
                "type": "string"
              },
              "score": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "description": {
                "type": "string"
              },
              "grounding": {
                "type": "object",
                "properties": {
                  "source_urls": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "evidence": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/NlwebEvidenceSpan"
                    }
                  }
                },
                "required": [
                  "source_urls",
                  "evidence"
                ]
              }
            },
            "required": [
              "@type",
              "url",
              "name",
              "site",
              "score",
              "description",
              "grounding"
            ]
          },
          {
            "type": "object",
            "properties": {
              "@type": {
                "type": "string",
                "const": "SearchSummary"
              },
              "text": {
                "type": "string"
              }
            },
            "required": [
              "@type",
              "text"
            ]
          }
        ]
      },
      "NlwebAnswerResponse": {
        "type": "object",
        "properties": {
          "_meta": {
            "type": "object",
            "properties": {
              "version": {
                "type": "string",
                "example": "0.55"
              },
              "request_id": {
                "type": "string"
              },
              "response_type": {
                "type": "string",
                "const": "answer"
              },
              "response_format": {
                "type": "string"
              },
              "mode": {
                "type": "string"
              },
              "sandbox": {
                "type": "boolean"
              },
              "release": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ]
              }
            },
            "required": [
              "version",
              "request_id",
              "response_type",
              "release"
            ]
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NlwebResultItem"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "required": [
          "_meta",
          "results",
          "pagination"
        ]
      },
      "NlwebErrorResponse": {
        "type": "object",
        "properties": {
          "_meta": {
            "type": "object",
            "properties": {
              "version": {
                "type": "string",
                "example": "0.55"
              },
              "request_id": {
                "type": "string"
              },
              "response_type": {
                "type": "string",
                "const": "failure"
              },
              "release": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ]
              }
            },
            "required": [
              "version",
              "request_id",
              "response_type"
            ]
          },
          "error": {
            "$ref": "#/components/schemas/ApiError"
          }
        },
        "required": [
          "_meta",
          "error"
        ]
      },
      "PageSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "section": {
            "type": "string",
            "enum": [
              "company",
              "product",
              "docs",
              "legal"
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "markdownUrl": {
            "type": "string",
            "format": "uri"
          },
          "lastUpdated": {
            "type": "string",
            "format": "date"
          }
        },
        "required": [
          "id",
          "slug",
          "section",
          "title",
          "description",
          "url",
          "markdownUrl",
          "lastUpdated"
        ]
      },
      "PageListResponse": {
        "type": "object",
        "properties": {
          "sandbox": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PageSummary"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "required": [
          "sandbox",
          "items",
          "pagination"
        ]
      },
      "InquiryValidateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 120,
            "description": "Sender full name."
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254,
            "description": "Sender reply-to email."
          },
          "category": {
            "type": "string",
            "enum": [
              "nidal",
              "engineering",
              "partnership",
              "investor",
              "general"
            ],
            "default": "general",
            "description": "Inquiry routing category."
          },
          "message": {
            "type": "string",
            "minLength": 10,
            "maxLength": 4000,
            "description": "Inquiry text."
          }
        },
        "required": [
          "name",
          "email",
          "message"
        ]
      },
      "InquiryValidateResponse": {
        "type": "object",
        "properties": {
          "validationId": {
            "type": "string"
          },
          "valid": {
            "type": "boolean",
            "const": true
          },
          "sandbox": {
            "type": "boolean"
          },
          "humanConfirmationRequired": {
            "type": "boolean",
            "const": true
          },
          "normalized": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string",
                "format": "email"
              },
              "category": {
                "type": "string"
              },
              "messageLength": {
                "type": "integer"
              }
            },
            "required": [
              "name",
              "email",
              "category",
              "messageLength"
            ]
          },
          "nextSteps": {
            "type": "object",
            "properties": {
              "contactPageUrl": {
                "type": "string",
                "format": "uri"
              },
              "mailtoUrl": {
                "type": "string"
              },
              "webmcpTool": {
                "type": "string"
              },
              "instructions": {
                "type": "string"
              }
            },
            "required": [
              "contactPageUrl",
              "mailtoUrl",
              "instructions"
            ]
          }
        },
        "required": [
          "validationId",
          "valid",
          "humanConfirmationRequired",
          "normalized",
          "nextSteps"
        ]
      },
      "ExportJobCreateRequest": {
        "type": "object",
        "properties": {
          "section": {
            "type": "string",
            "enum": [
              "company",
              "product",
              "docs",
              "legal"
            ],
            "description": "Optional section filter; omit to export the full NeuraNidus Markdown corpus."
          }
        }
      },
      "ExportJobAccepted": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "accepted",
              "running",
              "completed"
            ]
          },
          "sandbox": {
            "type": "boolean"
          },
          "section": {
            "type": "string"
          },
          "statusUrl": {
            "type": "string",
            "format": "uri"
          },
          "pollAfterSeconds": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "jobId",
          "status",
          "statusUrl",
          "pollAfterSeconds"
        ]
      },
      "ExportJobStatus": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "completed",
              "failed"
            ]
          },
          "sandbox": {
            "type": "boolean"
          },
          "releaseId": {
            "type": "string"
          },
          "company": {
            "type": "object"
          },
          "licensing": {
            "type": "object"
          },
          "documents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                },
                "section": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                },
                "markdownUrl": {
                  "type": "string",
                  "format": "uri"
                },
                "markdown": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "slug",
                "section",
                "title",
                "url",
                "markdownUrl",
                "markdown"
              ]
            }
          }
        },
        "required": [
          "jobId",
          "status",
          "releaseId",
          "documents"
        ]
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid request parameters or payload.",
        "headers": {
          "API-Version": {
            "$ref": "#/components/headers/ApiVersion"
          },
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimitLimit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimitRemaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimitReset"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiErrorEnvelope"
            }
          }
        }
      },
      "NlwebBadRequest": {
        "description": "Missing or invalid NLWeb query parameters.",
        "headers": {
          "API-Version": {
            "$ref": "#/components/headers/ApiVersion"
          },
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimitLimit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimitRemaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimitReset"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/NlwebErrorResponse"
            }
          }
        }
      },
      "NotFound": {
        "description": "Requested resource was not found.",
        "headers": {
          "API-Version": {
            "$ref": "#/components/headers/ApiVersion"
          },
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimitLimit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimitRemaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimitReset"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiErrorEnvelope"
            }
          }
        }
      },
      "IdempotencyConflict": {
        "description": "Idempotency-Key was reused with a different request payload.",
        "headers": {
          "API-Version": {
            "$ref": "#/components/headers/ApiVersion"
          },
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimitLimit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimitRemaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimitReset"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiErrorEnvelope"
            }
          }
        }
      },
      "PayloadTooLarge": {
        "description": "Request payload exceeds 64 KiB.",
        "headers": {
          "API-Version": {
            "$ref": "#/components/headers/ApiVersion"
          },
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimitLimit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimitRemaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimitReset"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiErrorEnvelope"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Client exceeded 120 requests per 60 seconds.",
        "headers": {
          "API-Version": {
            "$ref": "#/components/headers/ApiVersion"
          },
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimitLimit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimitRemaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimitReset"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          },
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiErrorEnvelope"
            }
          }
        }
      },
      "InternalError": {
        "description": "Unexpected server error.",
        "headers": {
          "API-Version": {
            "$ref": "#/components/headers/ApiVersion"
          },
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimitLimit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimitRemaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimitReset"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiErrorEnvelope"
            }
          }
        }
      }
    }
  }
}
