Search Chunks
curl --request POST \
--url https://api.intelligence.io.solutions/api/r2r/v3/chunks/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"search_settings": {
"model": "<string>",
"temperature": 123,
"top_p": 123,
"max_tokens_to_sample": 123,
"stream": true,
"functions": "<array>",
"tools": "<array>",
"add_generation_kwargs": "<array>",
"api_base": "<string>",
"response_format": [
{
"Base Model": {}
}
],
"extended_thinking": false,
"thinking_budget": 123,
"reasoning_effort": "<string>"
}
}
'import requests
url = "https://api.intelligence.io.solutions/api/r2r/v3/chunks/search"
payload = {
"query": "<string>",
"search_settings": {
"model": "<string>",
"temperature": 123,
"top_p": 123,
"max_tokens_to_sample": 123,
"stream": True,
"functions": "<array>",
"tools": "<array>",
"add_generation_kwargs": "<array>",
"api_base": "<string>",
"response_format": [{ "Base Model": {} }],
"extended_thinking": False,
"thinking_budget": 123,
"reasoning_effort": "<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>',
search_settings: {
model: '<string>',
temperature: 123,
top_p: 123,
max_tokens_to_sample: 123,
stream: true,
functions: '<array>',
tools: '<array>',
add_generation_kwargs: '<array>',
api_base: '<string>',
response_format: [{'Base Model': {}}],
extended_thinking: false,
thinking_budget: 123,
reasoning_effort: '<string>'
}
})
};
fetch('https://api.intelligence.io.solutions/api/r2r/v3/chunks/search', 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.intelligence.io.solutions/api/r2r/v3/chunks/search",
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' => '<string>',
'search_settings' => [
'model' => '<string>',
'temperature' => 123,
'top_p' => 123,
'max_tokens_to_sample' => 123,
'stream' => true,
'functions' => '<array>',
'tools' => '<array>',
'add_generation_kwargs' => '<array>',
'api_base' => '<string>',
'response_format' => [
[
'Base Model' => [
]
]
],
'extended_thinking' => false,
'thinking_budget' => 123,
'reasoning_effort' => '<string>'
]
]),
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.intelligence.io.solutions/api/r2r/v3/chunks/search"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"search_settings\": {\n \"model\": \"<string>\",\n \"temperature\": 123,\n \"top_p\": 123,\n \"max_tokens_to_sample\": 123,\n \"stream\": true,\n \"functions\": \"<array>\",\n \"tools\": \"<array>\",\n \"add_generation_kwargs\": \"<array>\",\n \"api_base\": \"<string>\",\n \"response_format\": [\n {\n \"Base Model\": {}\n }\n ],\n \"extended_thinking\": false,\n \"thinking_budget\": 123,\n \"reasoning_effort\": \"<string>\"\n }\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.intelligence.io.solutions/api/r2r/v3/chunks/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"search_settings\": {\n \"model\": \"<string>\",\n \"temperature\": 123,\n \"top_p\": 123,\n \"max_tokens_to_sample\": 123,\n \"stream\": true,\n \"functions\": \"<array>\",\n \"tools\": \"<array>\",\n \"add_generation_kwargs\": \"<array>\",\n \"api_base\": \"<string>\",\n \"response_format\": [\n {\n \"Base Model\": {}\n }\n ],\n \"extended_thinking\": false,\n \"thinking_budget\": 123,\n \"reasoning_effort\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.intelligence.io.solutions/api/r2r/v3/chunks/search")
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\": \"<string>\",\n \"search_settings\": {\n \"model\": \"<string>\",\n \"temperature\": 123,\n \"top_p\": 123,\n \"max_tokens_to_sample\": 123,\n \"stream\": true,\n \"functions\": \"<array>\",\n \"tools\": \"<array>\",\n \"add_generation_kwargs\": \"<array>\",\n \"api_base\": \"<string>\",\n \"response_format\": [\n {\n \"Base Model\": {}\n }\n ],\n \"extended_thinking\": false,\n \"thinking_budget\": 123,\n \"reasoning_effort\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"id": "3f3d47f3-8baf-58eb-8bc2-0171fb1c6e09",
"document_id": "3e157b3a-8469-51db-90d9-52e7d896b49b",
"collection_ids": [
"collection_ids"
],
"text": "Example text from the document",
"metadata": {
"associated_query": "What is the capital of France?",
"title": "example_document.pdf"
},
"owner_id": "2acb499e-8428-543b-bd85-0d9098718220",
"score": 0.23943702876567796
}
]
}{}""Chunks
Search Chunks
Perform a semantic search query over all stored chunks.
POST
/
api
/
r2r
/
v3
/
chunks
/
search
Search Chunks
curl --request POST \
--url https://api.intelligence.io.solutions/api/r2r/v3/chunks/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"search_settings": {
"model": "<string>",
"temperature": 123,
"top_p": 123,
"max_tokens_to_sample": 123,
"stream": true,
"functions": "<array>",
"tools": "<array>",
"add_generation_kwargs": "<array>",
"api_base": "<string>",
"response_format": [
{
"Base Model": {}
}
],
"extended_thinking": false,
"thinking_budget": 123,
"reasoning_effort": "<string>"
}
}
'import requests
url = "https://api.intelligence.io.solutions/api/r2r/v3/chunks/search"
payload = {
"query": "<string>",
"search_settings": {
"model": "<string>",
"temperature": 123,
"top_p": 123,
"max_tokens_to_sample": 123,
"stream": True,
"functions": "<array>",
"tools": "<array>",
"add_generation_kwargs": "<array>",
"api_base": "<string>",
"response_format": [{ "Base Model": {} }],
"extended_thinking": False,
"thinking_budget": 123,
"reasoning_effort": "<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>',
search_settings: {
model: '<string>',
temperature: 123,
top_p: 123,
max_tokens_to_sample: 123,
stream: true,
functions: '<array>',
tools: '<array>',
add_generation_kwargs: '<array>',
api_base: '<string>',
response_format: [{'Base Model': {}}],
extended_thinking: false,
thinking_budget: 123,
reasoning_effort: '<string>'
}
})
};
fetch('https://api.intelligence.io.solutions/api/r2r/v3/chunks/search', 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.intelligence.io.solutions/api/r2r/v3/chunks/search",
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' => '<string>',
'search_settings' => [
'model' => '<string>',
'temperature' => 123,
'top_p' => 123,
'max_tokens_to_sample' => 123,
'stream' => true,
'functions' => '<array>',
'tools' => '<array>',
'add_generation_kwargs' => '<array>',
'api_base' => '<string>',
'response_format' => [
[
'Base Model' => [
]
]
],
'extended_thinking' => false,
'thinking_budget' => 123,
'reasoning_effort' => '<string>'
]
]),
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.intelligence.io.solutions/api/r2r/v3/chunks/search"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"search_settings\": {\n \"model\": \"<string>\",\n \"temperature\": 123,\n \"top_p\": 123,\n \"max_tokens_to_sample\": 123,\n \"stream\": true,\n \"functions\": \"<array>\",\n \"tools\": \"<array>\",\n \"add_generation_kwargs\": \"<array>\",\n \"api_base\": \"<string>\",\n \"response_format\": [\n {\n \"Base Model\": {}\n }\n ],\n \"extended_thinking\": false,\n \"thinking_budget\": 123,\n \"reasoning_effort\": \"<string>\"\n }\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.intelligence.io.solutions/api/r2r/v3/chunks/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"search_settings\": {\n \"model\": \"<string>\",\n \"temperature\": 123,\n \"top_p\": 123,\n \"max_tokens_to_sample\": 123,\n \"stream\": true,\n \"functions\": \"<array>\",\n \"tools\": \"<array>\",\n \"add_generation_kwargs\": \"<array>\",\n \"api_base\": \"<string>\",\n \"response_format\": [\n {\n \"Base Model\": {}\n }\n ],\n \"extended_thinking\": false,\n \"thinking_budget\": 123,\n \"reasoning_effort\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.intelligence.io.solutions/api/r2r/v3/chunks/search")
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\": \"<string>\",\n \"search_settings\": {\n \"model\": \"<string>\",\n \"temperature\": 123,\n \"top_p\": 123,\n \"max_tokens_to_sample\": 123,\n \"stream\": true,\n \"functions\": \"<array>\",\n \"tools\": \"<array>\",\n \"add_generation_kwargs\": \"<array>\",\n \"api_base\": \"<string>\",\n \"response_format\": [\n {\n \"Base Model\": {}\n }\n ],\n \"extended_thinking\": false,\n \"thinking_budget\": 123,\n \"reasoning_effort\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"id": "3f3d47f3-8baf-58eb-8bc2-0171fb1c6e09",
"document_id": "3e157b3a-8469-51db-90d9-52e7d896b49b",
"collection_ids": [
"collection_ids"
],
"text": "Example text from the document",
"metadata": {
"associated_query": "What is the capital of France?",
"title": "example_document.pdf"
},
"owner_id": "2acb499e-8428-543b-bd85-0d9098718220",
"score": 0.23943702876567796
}
]
}{}""This endpoint allows for complex filtering of search results using PostgreSQL-based queries. Filters can be applied to various fields such as document_id, and internal metadata values.
Allowed operators include
eq, neq, gt, gte, lt, lte, like, ilike, in, and nin.Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
application/json
Response
200
Show child attributes
Show child attributes
Was this page helpful?
⌘I