curl --request GET \
--url https://api.example.com/api/v1/chunks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/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/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/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/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/chunks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/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{
"chunks": [
{
"id": "<string>",
"content_id": "<string>",
"collection_id": "<string>",
"content": "<string>",
"metadata": {},
"chunk_index": 123,
"size": 123,
"created_at": 123
}
],
"total_count": 0,
"next_cursor": "<string>",
"has_more": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}List Chunks
List chunks with cursor-based pagination.
Cursor-based pagination is more efficient than offset-based for large datasets:
- Consistent results even when data changes
- Better performance (no offset scanning)
- No “missed items” when new chunks are added
Args: collection_id: Optional filter by collection content_id: Optional filter by parent content cursor: Cursor from previous response for next page (None for first page) limit: Number of items to return (default: 50, max: 500) include_embedding: Include embedding vectors in response
Returns: ChunksListResponse with chunks, next_cursor, and has_more flag
Examples: First page of all chunks: GET /chunks?limit=50
Next page (using cursor from previous response): GET /chunks?cursor=chunk_xyz123&limit=50
List chunks for a specific collection: GET /chunks?collection_id=col_123&limit=50
Continue pagination for collection: GET /chunks?collection_id=col_123&cursor=chunk_abc456&limit=50
List chunks for specific content: GET /chunks?content_id=content_456&limit=20
List with embeddings: GET /chunks?collection_id=col_123&include_embedding=true&limit=10
curl --request GET \
--url https://api.example.com/api/v1/chunks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/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/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/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/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/chunks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/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{
"chunks": [
{
"id": "<string>",
"content_id": "<string>",
"collection_id": "<string>",
"content": "<string>",
"metadata": {},
"chunk_index": 123,
"size": 123,
"created_at": 123
}
],
"total_count": 0,
"next_cursor": "<string>",
"has_more": false
}{
"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
Query Parameters
Filter by collection ID
Filter by content ID
Cursor for pagination (use next_cursor from previous response)
Number of items to return
1 <= x <= 500Include embedding vectors
Response
Successful Response
Response model for listing chunks with cursor-based pagination.