curl --request POST \
--url https://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/document_split:plan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document_id": "<string>",
"document_classes": [
{
"name": "<string>",
"library_id": "<string>",
"document_class_id": "<string>",
"instruction": "<string>"
}
],
"llm_model_prefix": "gemini-2.5-pro",
"instruction": "<string>",
"batch_size": 50,
"maximal_batch_overlap": 10,
"pubsub_topic": "<string>"
}
'import requests
url = "https://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/document_split:plan"
payload = {
"document_id": "<string>",
"document_classes": [
{
"name": "<string>",
"library_id": "<string>",
"document_class_id": "<string>",
"instruction": "<string>"
}
],
"llm_model_prefix": "gemini-2.5-pro",
"instruction": "<string>",
"batch_size": 50,
"maximal_batch_overlap": 10,
"pubsub_topic": "<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({
document_id: '<string>',
document_classes: [
{
name: '<string>',
library_id: '<string>',
document_class_id: '<string>',
instruction: '<string>'
}
],
llm_model_prefix: 'gemini-2.5-pro',
instruction: '<string>',
batch_size: 50,
maximal_batch_overlap: 10,
pubsub_topic: '<string>'
})
};
fetch('https://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/document_split:plan', 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://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/document_split:plan",
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([
'document_id' => '<string>',
'document_classes' => [
[
'name' => '<string>',
'library_id' => '<string>',
'document_class_id' => '<string>',
'instruction' => '<string>'
]
],
'llm_model_prefix' => 'gemini-2.5-pro',
'instruction' => '<string>',
'batch_size' => 50,
'maximal_batch_overlap' => 10,
'pubsub_topic' => '<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://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/document_split:plan"
payload := strings.NewReader("{\n \"document_id\": \"<string>\",\n \"document_classes\": [\n {\n \"name\": \"<string>\",\n \"library_id\": \"<string>\",\n \"document_class_id\": \"<string>\",\n \"instruction\": \"<string>\"\n }\n ],\n \"llm_model_prefix\": \"gemini-2.5-pro\",\n \"instruction\": \"<string>\",\n \"batch_size\": 50,\n \"maximal_batch_overlap\": 10,\n \"pubsub_topic\": \"<string>\"\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://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/document_split:plan")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"document_id\": \"<string>\",\n \"document_classes\": [\n {\n \"name\": \"<string>\",\n \"library_id\": \"<string>\",\n \"document_class_id\": \"<string>\",\n \"instruction\": \"<string>\"\n }\n ],\n \"llm_model_prefix\": \"gemini-2.5-pro\",\n \"instruction\": \"<string>\",\n \"batch_size\": 50,\n \"maximal_batch_overlap\": 10,\n \"pubsub_topic\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/document_split:plan")
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 \"document_id\": \"<string>\",\n \"document_classes\": [\n {\n \"name\": \"<string>\",\n \"library_id\": \"<string>\",\n \"document_class_id\": \"<string>\",\n \"instruction\": \"<string>\"\n }\n ],\n \"llm_model_prefix\": \"gemini-2.5-pro\",\n \"instruction\": \"<string>\",\n \"batch_size\": 50,\n \"maximal_batch_overlap\": 10,\n \"pubsub_topic\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"source_document_id": "<string>",
"document_splits": [
{
"library_id": "<string>",
"document_class_id": "<string>",
"page_ranges": [
{
"start": 2,
"end": 2
}
],
"document_class_name": "<string>",
"confidence": "low",
"reasoning": "<string>"
}
],
"status": "in_progress",
"job_id": "<string>",
"total_pages": 123,
"pages_processed": 123,
"error_message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Plan Document Split
Split a document into multiple parts. For large documents, may return partial results with job_id for async processing.
curl --request POST \
--url https://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/document_split:plan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document_id": "<string>",
"document_classes": [
{
"name": "<string>",
"library_id": "<string>",
"document_class_id": "<string>",
"instruction": "<string>"
}
],
"llm_model_prefix": "gemini-2.5-pro",
"instruction": "<string>",
"batch_size": 50,
"maximal_batch_overlap": 10,
"pubsub_topic": "<string>"
}
'import requests
url = "https://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/document_split:plan"
payload = {
"document_id": "<string>",
"document_classes": [
{
"name": "<string>",
"library_id": "<string>",
"document_class_id": "<string>",
"instruction": "<string>"
}
],
"llm_model_prefix": "gemini-2.5-pro",
"instruction": "<string>",
"batch_size": 50,
"maximal_batch_overlap": 10,
"pubsub_topic": "<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({
document_id: '<string>',
document_classes: [
{
name: '<string>',
library_id: '<string>',
document_class_id: '<string>',
instruction: '<string>'
}
],
llm_model_prefix: 'gemini-2.5-pro',
instruction: '<string>',
batch_size: 50,
maximal_batch_overlap: 10,
pubsub_topic: '<string>'
})
};
fetch('https://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/document_split:plan', 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://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/document_split:plan",
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([
'document_id' => '<string>',
'document_classes' => [
[
'name' => '<string>',
'library_id' => '<string>',
'document_class_id' => '<string>',
'instruction' => '<string>'
]
],
'llm_model_prefix' => 'gemini-2.5-pro',
'instruction' => '<string>',
'batch_size' => 50,
'maximal_batch_overlap' => 10,
'pubsub_topic' => '<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://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/document_split:plan"
payload := strings.NewReader("{\n \"document_id\": \"<string>\",\n \"document_classes\": [\n {\n \"name\": \"<string>\",\n \"library_id\": \"<string>\",\n \"document_class_id\": \"<string>\",\n \"instruction\": \"<string>\"\n }\n ],\n \"llm_model_prefix\": \"gemini-2.5-pro\",\n \"instruction\": \"<string>\",\n \"batch_size\": 50,\n \"maximal_batch_overlap\": 10,\n \"pubsub_topic\": \"<string>\"\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://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/document_split:plan")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"document_id\": \"<string>\",\n \"document_classes\": [\n {\n \"name\": \"<string>\",\n \"library_id\": \"<string>\",\n \"document_class_id\": \"<string>\",\n \"instruction\": \"<string>\"\n }\n ],\n \"llm_model_prefix\": \"gemini-2.5-pro\",\n \"instruction\": \"<string>\",\n \"batch_size\": 50,\n \"maximal_batch_overlap\": 10,\n \"pubsub_topic\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://document-assistant.us.aodocs.app/assistant/api/v1/tenants/{tenant}/document_split:plan")
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 \"document_id\": \"<string>\",\n \"document_classes\": [\n {\n \"name\": \"<string>\",\n \"library_id\": \"<string>\",\n \"document_class_id\": \"<string>\",\n \"instruction\": \"<string>\"\n }\n ],\n \"llm_model_prefix\": \"gemini-2.5-pro\",\n \"instruction\": \"<string>\",\n \"batch_size\": 50,\n \"maximal_batch_overlap\": 10,\n \"pubsub_topic\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"source_document_id": "<string>",
"document_splits": [
{
"library_id": "<string>",
"document_class_id": "<string>",
"page_ranges": [
{
"start": 2,
"end": 2
}
],
"document_class_name": "<string>",
"confidence": "low",
"reasoning": "<string>"
}
],
"status": "in_progress",
"job_id": "<string>",
"total_pages": 123,
"pages_processed": 123,
"error_message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The domain of the customer
"example.com"
Body
The document ID of the files
The document classes to split the document into.
Show child attributes
Show child attributes
The LLM provider to use. If not provided, the default provider will be used.
OpenAI, Google, Altirnao, MistralAI, Anthropic The prefix of the LLM model name to use. If not provided, the default model will be used.
"gemini-2.5-pro"
Instruction to use when splitting the document.
Number of pages to process per batch for large documents. Documents with fewer pages than this will be processed in a single batch.
Number of pages to overlap between batches. This helps prevent splits from being cut off at batch boundaries.
x >= 0If provided, a notifications will be sent to this Pub/Sub topic upon completion.
Response
Successful Response
The ID of the original document that was split.
The list of document splits created as a result of the split.
Show child attributes
Show child attributes
Job status: 'in_progress', 'completed', or 'failed'.
in_progress, completed, failed Job ID if split is in progress. Null when completed.
Total pages in the document.
Pages processed so far.
Error message if job failed.