{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/foresea-ink/json-schema/foresea-ink-rag-ingest-request-schema.json",
  "title": "RagIngestRequest",
  "description": "Add a document to the user's knowledge base.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/foresea-ink-knowledge-api-openapi.yml#/components/schemas/RagIngestRequest",
  "properties": {
    "text": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200000
        },
        {
          "type": "null"
        }
      ],
      "title": "Text",
      "description": "Raw text to ingest."
    },
    "url": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ],
      "title": "Url",
      "description": "URL to fetch and ingest."
    },
    "title": {
      "type": "string",
      "maxLength": 300,
      "title": "Title",
      "default": ""
    },
    "namespace": {
      "type": "string",
      "maxLength": 40,
      "title": "Namespace",
      "description": "Corpus: 'kb', 'evidence', or 'forecasts'.",
      "default": "kb"
    }
  },
  "type": "object"
}