Up to 7.2× the speed of standard llama.cpp Runs 100% on your PC
Free for personal use
Download free
Local API Guide/Endpoints/Knowledge collections

Knowledge collections

GET/v1/knowledge/collections
Free: not countedBase URL http://localhost:1234/v1
Local API Guide contents

Overview

Lists the collections you made on the app's Knowledge page, with their ids. Use a collection's name or id with knowledge on chat completions or collection in Knowledge search.

Request

ParameterDescription
Authorization headerAuthorization: Bearer <key>, only when Require API key is on in the app.

Response

FieldDescription
objectstringlist
search_readybooleanWhether knowledge search can run now (the knowledge model is installed and a model is loaded).
data[].idstringThe collection id, like c:3.
data[].namestringThe name shown in the app.
data[].documentsintegerDocuments in the collection.

Example

curl http://localhost:1234/v1/knowledge/collections
Response
{
  "object": "list",
  "search_ready": true,
  "data": [
    { "id": "c:1", "name": "My documents", "documents": 12 },
    { "id": "c:3", "name": "Policies", "documents": 4 }
  ]
}

Errors

StatusCodeWhen
401invalid_api_keyRequire API key is on and the key is missing or wrong.
503knowledge_unavailableThe knowledge database could not be opened.