Knowledge

Create a knowledge base

POST
/api/v1/knowledge/bases

A knowledge base is one Vault folder made searchable. Its settings choose the chunking, the embedding model, rerank, fusion and retrieval; its folder may not overlap another base's. Its web sources (web.sources) are crawled once it is created; a source id another base holds is a 422.

More in Knowledge API.

apiKey
headerAuthorizationBearer <token>

An API key, sk-syn- and 32 characters. On SynapseOrch Cloud an owner or admin makes it under Settings → Developer; on a self-hosted install, under Settings → API Keys.

application/json
  1. body
name*string
Length1 <= length <= 200
description?string
Lengthlength <= 2000
Default""
folder*string
language?string
Default"simple"
visitor_access?boolean
Defaultfalse
budget_monthly_usd?|null
chunking?
embedding?

The embedding model. "" means the deployment's default (cloud: Titan v2 1024-d).

rerank?

None means the deployment's default: on in cloud, off in OSS unless configured.

fusion?
retrieval?
enrichment?

How passages are given context before they are embedded. prefix is deterministic and free; contextual is Contextual Retrieval, an opt-in behind a cost preview, on any chat model including your own.

web?

Per-KB crawl settings, each bounded by the deployment's caps (config.py).

Response Body

Successful Response

application/json
  1. response
id*string
name*string
Length1 <= length <= 200
description?string
Lengthlength <= 2000
Default""
folder*string
status?string
Default"active"
Value in"active""disabled"
language?string
Default"simple"
visitor_access?boolean
Defaultfalse
budget_monthly_usd?|null
chunking?
embedding?

The embedding model. "" means the deployment's default (cloud: Titan v2 1024-d).

rerank?

None means the deployment's default: on in cloud, off in OSS unless configured.

fusion?
retrieval?
enrichment?

How passages are given context before they are embedded. prefix is deterministic and free; contextual is Contextual Retrieval, an opt-in behind a cost preview, on any chat model including your own.

web?

Per-KB crawl settings, each bounded by the deployment's caps (config.py).

revision?integer
Range1 <= value
Default1
created_at?string
Default""
updated_at?string
Default""
state?
reindex_started?boolean
Defaultfalse
curl -X POST "https://api.synapseorch.com/api/v1/knowledge/bases" \  -H "Authorization: Bearer sk-syn-..." \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "folder": "string"  }'
{  "id": "string",  "name": "string",  "description": "",  "folder": "string",  "status": "active",  "language": "simple",  "visitor_access": false,  "budget_monthly_usd": 0,  "chunking": {    "mode": "structure",    "target_tokens": 450,    "max_tokens": 800,    "overlap_pct": 0  },  "embedding": {    "model": "",    "dims": 1,    "profile": "string"  },  "rerank": {    "enabled": true,    "model": "string",    "top_n": 8,    "candidates": 50  },  "fusion": {    "method": "rrf",    "rrf_k": 60,    "weights": {      "property1": 0,      "property2": 0    },    "overfetch": 50  },  "retrieval": {    "top_k": 8,    "score_threshold": 0,    "parent_expansion": "off",    "neighbor_window": 1,    "max_context_tokens": 6000  },  "enrichment": {    "mode": "prefix",    "contextual_model": "string",    "extract_metadata": false  },  "web": {    "max_depth": 3,    "max_pages": 500,    "rps_per_host": 1,    "recrawl_days": 7,    "sources": [      {        "id": "string",        "url": "string",        "kind": "page",        "include": [          "string"        ],        "exclude": [          "string"        ]      }    ]  },  "revision": 1,  "created_at": "",  "updated_at": "",  "state": {    "counts_by_status": {      "property1": 0,      "property2": 0    },    "active_snapshot": "string",    "building_snapshot": "string",    "month_spend_usd": 0,    "paused_reason": "string",    "build": {      "snapshot_id": "string",      "status": "building",      "docs_total": 0,      "docs_done": 0,      "docs_failed": 0,      "started_at": "string",      "paused_reason": "string",      "error": "string",      "passages_done": 0,      "passages_total": 0,      "stage": "parse",      "eta_s": 0,      "waiting": {        "reason": "rate_limited",        "provider": "string",        "provider_id": "string",        "until": "string"      }    }  },  "reindex_started": false}