Get Content Chunks
curl --request GET \
--url https://api.example.com/api/v1/contents/{content_id}/chunks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/contents/{content_id}/chunks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/contents/{content_id}/chunks', 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.example.com/api/v1/contents/{content_id}/chunks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/contents/{content_id}/chunks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/contents/{content_id}/chunks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/contents/{content_id}/chunks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"content_id": "<string>",
"collection_id": "<string>",
"chunks": [
{
"id": "<string>",
"content_id": "<string>",
"content": "<string>",
"embedding": [
123
],
"meta_data": {},
"collection_id": "<string>",
"workspace_id": "<string>",
"name": "<string>",
"filters": {},
"created_at": "<unknown>"
}
],
"total_chunks": 123,
"includes_embeddings": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Contents
Get Content Chunks
Get all chunks/vectors for a specific content in a collection.
Returns all the chunks (text segments with embeddings) that were created
when processing this content in the specified collection. This is useful for:
- Debugging vector search results
- Analyzing how content was chunked
- Inspecting chunk metadata
- Retrieving embeddings for analysis
**Important:** The same content can have different chunks in different collections
(due to different chunking strategies, embedding models, etc.), so `collection_id`
is required to ensure you get the correct set of chunks.
Args:
content_id: The unique identifier for the content
collection_id: The collection ID (ensures correct chunks are retrieved)
include_embeddings: Whether to include embedding vectors (default: false to save bandwidth)
Returns:
ContentChunksResponse with list of chunks and metadata
Example:
GET /contents/con_abc123/chunks?collection_id=col_xyz789&include_embeddings=false
Response:
{
"content_id": "con_abc123",
"collection_id": "col_xyz789",
"chunks": [
{
"id": "vec_chunk1",
"content_id": "con_abc123",
"content": "First chunk text...",
"embedding": null, // or array if include_embeddings=true
"meta_data": {"page": 1, "section": "intro"},
"collection_id": "col_xyz789",
"workspace_id": "wsp_123"
},
...
],
"total_chunks": 42,
"includes_embeddings": false
}
Raises:
404: If content not found or collection not accessible
500: If error retrieving chunks
GET
/
api
/
v1
/
contents
/
{content_id}
/
chunks
Get Content Chunks
curl --request GET \
--url https://api.example.com/api/v1/contents/{content_id}/chunks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/contents/{content_id}/chunks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/contents/{content_id}/chunks', 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.example.com/api/v1/contents/{content_id}/chunks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/contents/{content_id}/chunks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/contents/{content_id}/chunks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/contents/{content_id}/chunks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"content_id": "<string>",
"collection_id": "<string>",
"chunks": [
{
"id": "<string>",
"content_id": "<string>",
"content": "<string>",
"embedding": [
123
],
"meta_data": {},
"collection_id": "<string>",
"workspace_id": "<string>",
"name": "<string>",
"filters": {},
"created_at": "<unknown>"
}
],
"total_chunks": 123,
"includes_embeddings": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The workspace ID
Path Parameters
Query Parameters
Collection ID (required to ensure correct chunks)
Include embedding vectors (can be large)
Response
Successful Response
Schema for content chunks response.