Skip to content

List knowledge bases

GEThttps://gptunnel.ru/v1/database/list

Lists the knowledge bases owned by the API key’s owner. Two employees of the same organization may see different lists. To add a file, pass the selected base’s id from this response as databaseId.

Request headers

ParameterTypeDescription
Authorization*stringAPI key

Write down your API key to the variable environment GPTUNNEL_API_KEY.

import json
import os
from urllib.request import Request, urlopen
request = Request(
'https://gptunnel.ru/v1/database/list',
headers={'Authorization': os.environ['GPTUNNEL_API_KEY']},
)
with urlopen(request, timeout=30) as response:
print(json.load(response))
[
{
"id": "65ae53795863357cd4ea101d",
"createDate": "2024-01-22T11:37:29.886Z",
"name": "RAG Database #1"
}
]