curl --request POST \
--url https://api.conare.ai/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "how do refunds work?",
"top_k": 5
}
'import requests
url = "https://api.conare.ai/query"
payload = {
"query": "how do refunds work?",
"top_k": 5
}
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: 'how do refunds work?', top_k: 5})
};
fetch('https://api.conare.ai/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.conare.ai/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' => 'how do refunds work?',
'top_k' => 5
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.conare.ai/query"
payload := strings.NewReader("{\n \"query\": \"how do refunds work?\",\n \"top_k\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://api.conare.ai/query")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"how do refunds work?\",\n \"top_k\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conare.ai/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"how do refunds work?\",\n \"top_k\": 5\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"namespace": "support",
"id": "refunds",
"text": "Refunds are available for 30 days after purchase.",
"score": 0.91,
"reranked": true,
"metadata": {
"team": "support"
}
}
],
"namespaces": [
"support",
"wiki"
],
"took_ms": 58
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}Query every namespace
The same hybrid search as a namespace query, across the organization’s namespaces (the first 10), merged and reranked once. Each result names its namespace. A passage that repeats a higher-ranked one is dropped. Counts as one query.
curl --request POST \
--url https://api.conare.ai/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "how do refunds work?",
"top_k": 5
}
'import requests
url = "https://api.conare.ai/query"
payload = {
"query": "how do refunds work?",
"top_k": 5
}
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: 'how do refunds work?', top_k: 5})
};
fetch('https://api.conare.ai/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.conare.ai/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' => 'how do refunds work?',
'top_k' => 5
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.conare.ai/query"
payload := strings.NewReader("{\n \"query\": \"how do refunds work?\",\n \"top_k\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://api.conare.ai/query")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"how do refunds work?\",\n \"top_k\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conare.ai/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"how do refunds work?\",\n \"top_k\": 5\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"namespace": "support",
"id": "refunds",
"text": "Refunds are available for 30 days after purchase.",
"score": 0.91,
"reranked": true,
"metadata": {
"team": "support"
}
}
],
"namespaces": [
"support",
"wiki"
],
"took_ms": 58
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}Authorizations
An API key from conare.ai/dashboard/keys. A key reaches every namespace in its organization, unless it was made scoped to some namespaces (exact names, or prefixes ending in * such as tenant-*): then every other namespace answers 403 namespace_forbidden, lists and cross-namespace queries leave them out, and the sources routes answer 403 forbidden.
Body
What to search for
1 - 8000How many results to return.
1 <= x <= 100A metadata filter. {"key": value} means equals (a string also matches an array holding
it); $eq is the same and $in matches any listed value. Equality compares as text (3
matches "3"). $gt, $gte, $lt and $lte (one per side) compare a number or string
value, not an array item: number bounds compare numbers, string bounds compare strings by
their UTF-8 bytes (ISO dates sort as dates); a value of the other type never matches.
Strings longer than about 220 bytes cannot be compared. Combine filters with $and and
$or arrays. $ne and $nin are not supported (400 invalid_filter).
Show child attributes
Show child attributes
{ "team": "support" }
{
"$or": [
{ "team": "support" },
{ "year": { "$in": [2024, 2025] } }
]
}
{ "year": { "$gte": 2020, "$lt": 2025 } }
{ "published_at": { "$gte": "2025-06-01" } }
Rerank the candidates with the reranking model.
As in a namespace query.
1 <= x <= 100As in a namespace query.
1 - 3 elementsvector, keyword, sparse