Download OpenAPI specification:
Local knowledge base REST API
{- "command": "status",
- "config": {
- "documents_dir": "string",
- "data_dir": "string",
- "chat_model": "string",
- "embedding_model": "string",
- "vision_model": "",
- "reranker_model": "",
- "enable_ocr": true
}, - "sources": [
- {
- "filename": "string",
- "file_hash": "string",
- "chunk_count": 0,
- "ingested_at": "string"
}
], - "total_chunks": 0,
- "entities": {
- "types": [
- "string"
], - "rows": 0
}
}| q required | string |
| top_k | integer [ 1 .. 100 ] Default: 5 |
string or null |
[- {
- "source": "string",
- "content_type": "string",
- "excerpts": [
- {
- "content": "string",
- "page_start": 0,
- "page_end": 0,
- "line_start": 0,
- "line_end": 0,
- "relevance": 0
}
], - "best_relevance": 0,
- "vault_path": "string"
}
]| question required | string |
| top_k | integer [ 0 .. 100 ] Default: 0 |
object or null | |
ChunkType (string) or null |
{- "question": "string",
- "top_k": 0,
- "options": {
- "property1": null,
- "property2": null
}, - "chunk_type": "raw"
}{- "answer": "string",
- "sources": [
- {
- "source": "string",
- "content_type": "string",
- "chunk": "string",
- "distance": 0,
- "relevance_score": 0,
- "rerank_score": 0,
- "score": 0,
- "page_start": 0,
- "page_end": 0,
- "line_start": 0,
- "line_end": 0,
- "chunk_index": 0,
- "vault_path": "string"
}
], - "cited_sources": [
- {
- "source": "string",
- "content_type": "string",
- "chunk": "string",
- "distance": 0,
- "relevance_score": 0,
- "rerank_score": 0,
- "score": 0,
- "page_start": 0,
- "page_end": 0,
- "line_start": 0,
- "line_end": 0,
- "chunk_index": 0,
- "vault_path": "string"
}
], - "compaction": {
- "summary": "string",
- "condensed": 0,
- "stranded": 0
}
}| question required | string |
| top_k | integer [ 0 .. 100 ] Default: 0 |
object or null | |
ChunkType (string) or null |
{- "question": "string",
- "top_k": 0,
- "options": {
- "property1": null,
- "property2": null
}, - "chunk_type": "raw"
}null| question required | string |
| history | any Default: [] |
integer or null <= 100 | |
object or null | |
ChunkType (string) or null | |
| summary | string Default: "" |
string or null |
{- "question": "string",
- "history": [ ],
- "top_k": 0,
- "options": {
- "property1": null,
- "property2": null
}, - "chunk_type": "raw",
- "summary": "",
- "session_id": "string"
}{- "answer": "string",
- "sources": [
- {
- "source": "string",
- "content_type": "string",
- "chunk": "string",
- "distance": 0,
- "relevance_score": 0,
- "rerank_score": 0,
- "score": 0,
- "page_start": 0,
- "page_end": 0,
- "line_start": 0,
- "line_end": 0,
- "chunk_index": 0,
- "vault_path": "string"
}
], - "cited_sources": [
- {
- "source": "string",
- "content_type": "string",
- "chunk": "string",
- "distance": 0,
- "relevance_score": 0,
- "rerank_score": 0,
- "score": 0,
- "page_start": 0,
- "page_end": 0,
- "line_start": 0,
- "line_end": 0,
- "chunk_index": 0,
- "vault_path": "string"
}
], - "compaction": {
- "summary": "string",
- "condensed": 0,
- "stranded": 0
}
}| question required | string |
| history | any Default: [] |
integer or null <= 100 | |
object or null | |
ChunkType (string) or null | |
| summary | string Default: "" |
string or null |
{- "question": "string",
- "history": [ ],
- "top_k": 0,
- "options": {
- "property1": null,
- "property2": null
}, - "chunk_type": "raw",
- "summary": "",
- "session_id": "string"
}null| model required | string non-empty |
required | Array of objects (CompletionsMessage) non-empty |
Array of CompletionsTool (objects) or null | |
ToolChoiceMode (string) or CompletionsNamedToolChoice (object) or null | |
number or null <= 2 | |
number or null <= 1 | |
integer or null >= 1 | |
integer or null >= 1 | |
integer or null | |
number or null [ -2 .. 2 ] | |
number or null [ -2 .. 2 ] | |
integer or null >= 1 | |
string or Array of strings or null | |
| stream | boolean Default: false |
StreamOptions (object) or null |
{- "model": "string",
- "messages": [
- {
- "role": "system",
- "content": "string",
- "name": "string",
- "tool_calls": [
- {
- "id": "string",
- "type": "function",
- "function": {
- "name": "string",
- "arguments": "{}"
}
}
], - "tool_call_id": "string"
}
], - "tools": [
- {
- "type": "function",
- "function": {
- "name": "string",
- "description": "string",
- "parameters": {
- "property1": null,
- "property2": null
}
}
}
], - "tool_choice": "auto",
- "temperature": 0,
- "top_p": 0,
- "top_k": 0,
- "max_tokens": 0,
- "seed": 0,
- "frequency_penalty": 0,
- "presence_penalty": 0,
- "n": 0,
- "stop": "string",
- "stream": false,
- "stream_options": {
- "include_usage": false
}
}nullboolean or null | |
| force_rebuild | boolean Default: false |
| retry_skipped | boolean Default: false |
{- "enable_ocr": true,
- "force_rebuild": false,
- "retry_skipped": false
}null| paths required | Array of strings |
| force | boolean Default: false |
boolean or null | |
number or null |
{- "paths": [
- "string"
], - "force": false,
- "enable_ocr": true,
- "ocr_timeout": 0
}null{- "chat": {
- "active": "string",
- "catalog": [
- {
- "name": "string",
- "size_gb": 0,
- "min_ram_gb": 0,
- "description": "string",
- "installed": true
}
], - "installed": [
- "string"
]
}, - "embedding": {
- "active": "string",
- "catalog": [
- {
- "name": "string",
- "size_gb": 0,
- "min_ram_gb": 0,
- "description": "string",
- "installed": true
}
], - "installed": [
- "string"
]
}, - "vision": {
- "active": "string",
- "catalog": [
- {
- "name": "string",
- "size_gb": 0,
- "min_ram_gb": 0,
- "description": "string",
- "installed": true
}
], - "installed": [
- "string"
]
}, - "reranker": {
- "active": "string",
- "catalog": [
- {
- "name": "string",
- "size_gb": 0,
- "min_ram_gb": 0,
- "description": "string",
- "installed": true
}
], - "installed": [
- "string"
]
}
}string or null | |
| search | string Default: "" |
string or null | |
boolean or null | |
boolean or null | |
| sort | string Default: "featured" |
| limit | integer [ 1 .. 1000 ] Default: 20 |
| offset | integer >= 0 Default: 0 |
{- "total": 0,
- "limit": 0,
- "offset": 0,
- "models": [
- {
- "hf_repo": "string",
- "gguf_filename": "string",
- "task": "chat",
- "display_name": "string",
- "param_count": "string",
- "size_gb": 0,
- "min_ram_gb": 0,
- "description": "string",
- "quality_tier": "string",
- "featured": true,
- "downloads": 0,
- "installed": true,
- "source": "native",
- "fit": "fits",
- "size_variants": [ ],
- "architecture": "",
- "compat": "supported",
- "provider": "",
- "key_status": "ready"
}
], - "has_more": false
}| model required | string |
| source | string Default: "native" |
| allow_unsupported | boolean Default: false |
{- "model": "string",
- "source": "native",
- "allow_unsupported": false
}null| search | string Default: "" |
| limit | integer [ 1 .. 1000 ] Default: 50 |
| offset | integer >= 0 Default: 0 |
{- "documents": [
- {
- "filename": "string",
- "chunk_count": 0,
- "ingested_at": ""
}
], - "total": 0,
- "limit": 0,
- "offset": 0,
- "has_more": false
}| names required | Array of strings <= 100 items |
| delete_files | boolean Default: false |
{- "names": [
- "string"
], - "delete_files": false
}{- "removed": [
- "string"
], - "not_found": [
- "string"
]
}| text required | string |
| kind | string (MemoryKind) Enum: "preference" "fact" Whether a memory is an always-injected preference or a similarity-recalled fact. |
| shared | boolean Default: false |
{- "text": "string",
- "kind": "preference",
- "shared": false
}{- "id": "string",
- "kind": "preference"
}| model_ref required | string |
| scope required | string |
{- "model_ref": "string",
- "scope": "string"
}{- "meta": {
- "id": "string",
- "title": "string",
- "created_at": "string",
- "updated_at": "string",
- "model_ref": "string",
- "scope": "string",
- "message_count": 0,
- "origin": "tui"
}, - "messages": [
- {
- "role": "user",
- "content": "string",
- "sources": [
- "string"
], - "ts": "string"
}
], - "summary": ""
}{- "meta": {
- "id": "string",
- "title": "string",
- "created_at": "string",
- "updated_at": "string",
- "model_ref": "string",
- "scope": "string",
- "message_count": 0,
- "origin": "tui"
}, - "messages": [
- {
- "role": "user",
- "content": "string",
- "sources": [
- "string"
], - "ts": "string"
}
], - "summary": ""
}| session_id required | string |
| role required | string (MessageRole) Enum: "user" "assistant" Author of a chat message. |
| content required | string |
| sources | Array of strings Default: [] |
{- "role": "user",
- "content": "string",
- "sources": [ ]
}{- "meta": {
- "id": "string",
- "title": "string",
- "created_at": "string",
- "updated_at": "string",
- "model_ref": "string",
- "scope": "string",
- "message_count": 0,
- "origin": "tui"
}, - "messages": [
- {
- "role": "user",
- "content": "string",
- "sources": [
- "string"
], - "ts": "string"
}
], - "summary": ""
}{- "meta": {
- "id": "string",
- "title": "string",
- "created_at": "string",
- "updated_at": "string",
- "model_ref": "string",
- "scope": "string",
- "message_count": 0,
- "origin": "tui"
}, - "messages": [
- {
- "role": "user",
- "content": "string",
- "sources": [
- "string"
], - "ts": "string"
}
], - "summary": ""
}| session_id required | string |
| summary required | string |
{- "summary": "string"
}{- "meta": {
- "id": "string",
- "title": "string",
- "created_at": "string",
- "updated_at": "string",
- "model_ref": "string",
- "scope": "string",
- "message_count": 0,
- "origin": "tui"
}, - "messages": [
- {
- "role": "user",
- "content": "string",
- "sources": [
- "string"
], - "ts": "string"
}
], - "summary": ""
}{- "gpus": [
- {
- "index": 0,
- "backend": "string",
- "label": "string",
- "name": "string",
- "total_bytes": 0,
- "free_bytes": 0
}
], - "roles": [
- {
- "role": "embed",
- "model": "string",
- "devices": [
- 0
], - "tensor_split": [
- 0
], - "replicas": 0
}
], - "unplaceable": [
- "string"
], - "manual": true,
- "spec_json": "string",
- "skipped_not_installed": [ ],
- "co_tenants": [ ],
- "notice": "string"
}{- "spec": {
- "property1": {
- "property1": null,
- "property2": null
}, - "property2": {
- "property1": null,
- "property2": null
}
}
}{- "gpus": [
- {
- "index": 0,
- "backend": "string",
- "label": "string",
- "name": "string",
- "total_bytes": 0,
- "free_bytes": 0
}
], - "roles": [
- {
- "role": "embed",
- "model": "string",
- "devices": [
- 0
], - "tensor_split": [
- 0
], - "replicas": 0
}
], - "unplaceable": [
- "string"
], - "manual": true,
- "spec_json": "string",
- "skipped_not_installed": [ ],
- "co_tenants": [ ],
- "notice": "string"
}{- "gpus": [
- {
- "index": 0,
- "backend": "string",
- "label": "string",
- "name": "string",
- "total_bytes": 0,
- "free_bytes": 0
}
], - "roles": [
- {
- "role": "embed",
- "model": "string",
- "devices": [
- 0
], - "tensor_split": [
- 0
], - "replicas": 0
}
], - "unplaceable": [
- "string"
], - "manual": true,
- "spec_json": "string",
- "skipped_not_installed": [ ],
- "co_tenants": [ ],
- "notice": "string"
}{- "spec": {
- "property1": {
- "property1": null,
- "property2": null
}, - "property2": {
- "property1": null,
- "property2": null
}
}
}{- "gpus": [
- {
- "index": 0,
- "backend": "string",
- "label": "string",
- "name": "string",
- "total_bytes": 0,
- "free_bytes": 0
}
], - "roles": [
- {
- "role": "embed",
- "model": "string",
- "devices": [
- 0
], - "tensor_split": [
- 0
], - "replicas": 0
}
], - "unplaceable": [
- "string"
], - "manual": true,
- "spec_json": "string",
- "skipped_not_installed": [ ],
- "co_tenants": [ ],
- "notice": "string"
}| url required | string |
integer or null | |
integer or null | |
CrawlRenderMode (string) or null | |
| include_subdomains | boolean Default: false |
{- "url": "string",
- "depth": 0,
- "max_pages": 0,
- "render_mode": "http",
- "include_subdomains": false
}null[- {
- "wiki_source": "",
- "wiki_chunk_index": 0,
- "citation_key": "",
- "claim_type": "fact",
- "source_filename": "",
- "source_hash": "",
- "page_start": 0,
- "page_end": 0,
- "line_start": 0,
- "line_end": 0,
- "excerpt": "",
- "created_at": ""
}
]