Search Knowledge Base
POST
https://x.kupe.in
/
v1
/
orgs
/
{org_id}
/
projects
/
{project_id}
/
knowledge-bases
/
{kb_id}
/
search
Search Knowledge Base
import requests
url = "https://x.kupe.in/v1/orgs/{org_id}/projects/{project_id}/knowledge-bases/{kb_id}/search"
payload = { "query": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>'})
};
fetch('https://x.kupe.in/v1/orgs/{org_id}/projects/{project_id}/knowledge-bases/{kb_id}/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://x.kupe.in/v1/orgs/{org_id}/projects/{project_id}/knowledge-bases/{kb_id}/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>"
}
'{
"chunks": [
{
"id": "<string>",
"file_id": "<string>",
"content": "<string>",
"similarity": 123,
"filename": "",
"chunk_index": 0
}
],
"latency_ms": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Project API key (sk-kupe-...) or a Supabase user JWT.
Body
application/json
⌘I
Search Knowledge Base
import requests
url = "https://x.kupe.in/v1/orgs/{org_id}/projects/{project_id}/knowledge-bases/{kb_id}/search"
payload = { "query": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>'})
};
fetch('https://x.kupe.in/v1/orgs/{org_id}/projects/{project_id}/knowledge-bases/{kb_id}/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://x.kupe.in/v1/orgs/{org_id}/projects/{project_id}/knowledge-bases/{kb_id}/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>"
}
'{
"chunks": [
{
"id": "<string>",
"file_id": "<string>",
"content": "<string>",
"similarity": 123,
"filename": "",
"chunk_index": 0
}
],
"latency_ms": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}
