curl --request POST \
--url https://versuno.ai/api/public/brains/{id}/containers/{containerId}/query \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "What is the params prop?"
}
'import requests
url = "https://versuno.ai/api/public/brains/{id}/containers/{containerId}/query"
payload = { "query": "What is the params prop?" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'What is the params prop?'})
};
fetch('https://versuno.ai/api/public/brains/{id}/containers/{containerId}/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://versuno.ai/api/public/brains/{id}/containers/{containerId}/query"
payload := strings.NewReader("{\n \"query\": \"What is the params prop?\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://versuno.ai/api/public/brains/{id}/containers/{containerId}/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => 'What is the params prop?'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://versuno.ai/api/public/brains/{id}/containers/{containerId}/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"What is the params prop?\"\n}"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.post("https://versuno.ai/api/public/brains/{id}/containers/{containerId}/query")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"What is the params prop?\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://versuno.ai/api/public/brains/{id}/containers/{containerId}/query");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("{\n \"query\": \"What is the params prop?\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"success": true,
"data": {
"objects": {
"chunks": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "chunk",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"container_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brain_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"canonical": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
],
"chunk_parts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "chunk_part",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"container_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brain_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"content": "Dynamic segments are passed as the params prop...",
"relevancy_score": 0.82,
"metadata": {
"num": 2
},
"created_at": "<string>",
"updated_at": "<string>"
}
],
"pages": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "page",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"container_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brain_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"canonical": "<string>",
"metadata": {
"urlGroup": [
"<string>"
]
},
"created_at": "<string>",
"updated_at": "<string>"
}
]
},
"graph_tree": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"children": "<array>"
}
],
"graph_context": {
"relations": {}
}
},
"error": null,
"metadata": {
"query_latency_ms": 142,
"embedding_latency_ms": 88
}
}{
"error": "Wrong data: assetType is required"
}{
"error": "Invalid API key"
}Query a container
Same as Query a brain, but scopes the semantic search to a single container within the brain.
Runs under a shared Versuno service identity (public brains only), and returns HTTP 200 with a success/error envelope. This container query is not metered.
curl --request POST \
--url https://versuno.ai/api/public/brains/{id}/containers/{containerId}/query \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "What is the params prop?"
}
'import requests
url = "https://versuno.ai/api/public/brains/{id}/containers/{containerId}/query"
payload = { "query": "What is the params prop?" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'What is the params prop?'})
};
fetch('https://versuno.ai/api/public/brains/{id}/containers/{containerId}/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://versuno.ai/api/public/brains/{id}/containers/{containerId}/query"
payload := strings.NewReader("{\n \"query\": \"What is the params prop?\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://versuno.ai/api/public/brains/{id}/containers/{containerId}/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => 'What is the params prop?'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://versuno.ai/api/public/brains/{id}/containers/{containerId}/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"What is the params prop?\"\n}"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.post("https://versuno.ai/api/public/brains/{id}/containers/{containerId}/query")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"What is the params prop?\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://versuno.ai/api/public/brains/{id}/containers/{containerId}/query");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("{\n \"query\": \"What is the params prop?\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"success": true,
"data": {
"objects": {
"chunks": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "chunk",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"container_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brain_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"canonical": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
],
"chunk_parts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "chunk_part",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"container_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brain_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"content": "Dynamic segments are passed as the params prop...",
"relevancy_score": 0.82,
"metadata": {
"num": 2
},
"created_at": "<string>",
"updated_at": "<string>"
}
],
"pages": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "page",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"container_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brain_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"canonical": "<string>",
"metadata": {
"urlGroup": [
"<string>"
]
},
"created_at": "<string>",
"updated_at": "<string>"
}
]
},
"graph_tree": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"children": "<array>"
}
],
"graph_context": {
"relations": {}
}
},
"error": null,
"metadata": {
"query_latency_ms": 142,
"embedding_latency_ms": 88
}
}{
"error": "Wrong data: assetType is required"
}{
"error": "Invalid API key"
}Authorizations
Versuno API key. Must be prefixed with Bearer. Format: Bearer uk_live_...
Path Parameters
ID of the brain.
ID of the container to scope the query to.
Body
The natural-language query to search the container with.
1 - 4000"What is the params prop?"
Optional list of entity names to bias the search toward.
["dynamic-routes"]
Maximum number of results to return (1–20, default 5).
1 <= x <= 205
Response
Query result envelope. Check success to determine if the query actually succeeded.
Result envelope for a brain query. Always returned with HTTP 200; check success and error.
Whether the query succeeded. Inspect this rather than the HTTP status.
true
Query result payload, or null when success is false.
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
chunk Hide child attributes
Hide child attributes
chunk_part The text content of this part.
"Dynamic segments are passed as the params prop..."
Similarity score against the query, 0–1.
0 <= x <= 10.82
Hide child attributes
Hide child attributes
page Hide child attributes
Hide child attributes
Map of object ID to its outgoing relations.
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Error message when success is false, otherwise null.
null
Was this page helpful?

