curl --request POST \
--url https://api.example.com/v1/projects/{project_id}/parse/upload-result \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-selected-account-id: <api-key>' \
--data '
{
"content": {
"chunks": [
{
"content": "<string>",
"blocks": [
{
"type": "<string>",
"content": "<string>",
"bbox": {
"left": 123,
"top": 123,
"width": 123,
"height": 123
},
"confidence": 123,
"page_number": 0
}
]
}
]
},
"source_document_id": "<string>",
"engine": "<string>",
"parse_metadata": {
"source_id": "<string>",
"filename": "<string>",
"pages_processed": 123
},
"object": "parse_result",
"vector_store_metadata": {},
"parameters": {},
"error": "<string>",
"processing_time_ms": 123
}
'import requests
url = "https://api.example.com/v1/projects/{project_id}/parse/upload-result"
payload = {
"content": { "chunks": [
{
"content": "<string>",
"blocks": [
{
"type": "<string>",
"content": "<string>",
"bbox": {
"left": 123,
"top": 123,
"width": 123,
"height": 123
},
"confidence": 123,
"page_number": 0
}
]
}
] },
"source_document_id": "<string>",
"engine": "<string>",
"parse_metadata": {
"source_id": "<string>",
"filename": "<string>",
"pages_processed": 123
},
"object": "parse_result",
"vector_store_metadata": {},
"parameters": {},
"error": "<string>",
"processing_time_ms": 123
}
headers = {
"x-api-key": "<api-key>",
"x-selected-account-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'x-selected-account-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
content: {
chunks: [
{
content: '<string>',
blocks: [
{
type: '<string>',
content: '<string>',
bbox: {left: 123, top: 123, width: 123, height: 123},
confidence: 123,
page_number: 0
}
]
}
]
},
source_document_id: '<string>',
engine: '<string>',
parse_metadata: {source_id: '<string>', filename: '<string>', pages_processed: 123},
object: 'parse_result',
vector_store_metadata: {},
parameters: {},
error: '<string>',
processing_time_ms: 123
})
};
fetch('https://api.example.com/v1/projects/{project_id}/parse/upload-result', 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/v1/projects/{project_id}/parse/upload-result",
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([
'content' => [
'chunks' => [
[
'content' => '<string>',
'blocks' => [
[
'type' => '<string>',
'content' => '<string>',
'bbox' => [
'left' => 123,
'top' => 123,
'width' => 123,
'height' => 123
],
'confidence' => 123,
'page_number' => 0
]
]
]
]
],
'source_document_id' => '<string>',
'engine' => '<string>',
'parse_metadata' => [
'source_id' => '<string>',
'filename' => '<string>',
'pages_processed' => 123
],
'object' => 'parse_result',
'vector_store_metadata' => [
],
'parameters' => [
],
'error' => '<string>',
'processing_time_ms' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-selected-account-id: <api-key>"
],
]);
$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.example.com/v1/projects/{project_id}/parse/upload-result"
payload := strings.NewReader("{\n \"content\": {\n \"chunks\": [\n {\n \"content\": \"<string>\",\n \"blocks\": [\n {\n \"type\": \"<string>\",\n \"content\": \"<string>\",\n \"bbox\": {\n \"left\": 123,\n \"top\": 123,\n \"width\": 123,\n \"height\": 123\n },\n \"confidence\": 123,\n \"page_number\": 0\n }\n ]\n }\n ]\n },\n \"source_document_id\": \"<string>\",\n \"engine\": \"<string>\",\n \"parse_metadata\": {\n \"source_id\": \"<string>\",\n \"filename\": \"<string>\",\n \"pages_processed\": 123\n },\n \"object\": \"parse_result\",\n \"vector_store_metadata\": {},\n \"parameters\": {},\n \"error\": \"<string>\",\n \"processing_time_ms\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-selected-account-id", "<api-key>")
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.example.com/v1/projects/{project_id}/parse/upload-result")
.header("x-api-key", "<api-key>")
.header("x-selected-account-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"content\": {\n \"chunks\": [\n {\n \"content\": \"<string>\",\n \"blocks\": [\n {\n \"type\": \"<string>\",\n \"content\": \"<string>\",\n \"bbox\": {\n \"left\": 123,\n \"top\": 123,\n \"width\": 123,\n \"height\": 123\n },\n \"confidence\": 123,\n \"page_number\": 0\n }\n ]\n }\n ]\n },\n \"source_document_id\": \"<string>\",\n \"engine\": \"<string>\",\n \"parse_metadata\": {\n \"source_id\": \"<string>\",\n \"filename\": \"<string>\",\n \"pages_processed\": 123\n },\n \"object\": \"parse_result\",\n \"vector_store_metadata\": {},\n \"parameters\": {},\n \"error\": \"<string>\",\n \"processing_time_ms\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/projects/{project_id}/parse/upload-result")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["x-selected-account-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": {\n \"chunks\": [\n {\n \"content\": \"<string>\",\n \"blocks\": [\n {\n \"type\": \"<string>\",\n \"content\": \"<string>\",\n \"bbox\": {\n \"left\": 123,\n \"top\": 123,\n \"width\": 123,\n \"height\": 123\n },\n \"confidence\": 123,\n \"page_number\": 0\n }\n ]\n }\n ]\n },\n \"source_document_id\": \"<string>\",\n \"engine\": \"<string>\",\n \"parse_metadata\": {\n \"source_id\": \"<string>\",\n \"filename\": \"<string>\",\n \"pages_processed\": 123\n },\n \"object\": \"parse_result\",\n \"vector_store_metadata\": {},\n \"parameters\": {},\n \"error\": \"<string>\",\n \"processing_time_ms\": 123\n}"
response = http.request(request)
puts response.read_body{
"source_document_id": "<string>",
"engine": "<string>",
"parse_metadata": {
"source_id": "<string>",
"filename": "<string>",
"pages_processed": 123
},
"id": "<string>",
"project_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"content": {
"chunks": [
{
"content": "<string>",
"blocks": [
{
"type": "<string>",
"content": "<string>",
"bbox": {
"left": 123,
"top": 123,
"width": 123,
"height": 123
},
"confidence": 123,
"page_number": 0
}
]
}
]
},
"object": "parse_result",
"vector_store_metadata": {},
"parameters": {},
"error": "<string>",
"processing_time_ms": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Upload Parse Result
Ingest a pre-computed parse result directly without creating a job.
This endpoint allows direct ingestion of parse results from external tools while storing them in a dedicated parse_results table for better performance and indexing.
Args: request: Parse result creation request with source document ID and result payload storage_gateway: Storage gateway for uploading content to object store
Returns: ParseResultEntity representing the stored parse result
Raises: HTTPException: If the source document is not found or other errors occur
curl --request POST \
--url https://api.example.com/v1/projects/{project_id}/parse/upload-result \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-selected-account-id: <api-key>' \
--data '
{
"content": {
"chunks": [
{
"content": "<string>",
"blocks": [
{
"type": "<string>",
"content": "<string>",
"bbox": {
"left": 123,
"top": 123,
"width": 123,
"height": 123
},
"confidence": 123,
"page_number": 0
}
]
}
]
},
"source_document_id": "<string>",
"engine": "<string>",
"parse_metadata": {
"source_id": "<string>",
"filename": "<string>",
"pages_processed": 123
},
"object": "parse_result",
"vector_store_metadata": {},
"parameters": {},
"error": "<string>",
"processing_time_ms": 123
}
'import requests
url = "https://api.example.com/v1/projects/{project_id}/parse/upload-result"
payload = {
"content": { "chunks": [
{
"content": "<string>",
"blocks": [
{
"type": "<string>",
"content": "<string>",
"bbox": {
"left": 123,
"top": 123,
"width": 123,
"height": 123
},
"confidence": 123,
"page_number": 0
}
]
}
] },
"source_document_id": "<string>",
"engine": "<string>",
"parse_metadata": {
"source_id": "<string>",
"filename": "<string>",
"pages_processed": 123
},
"object": "parse_result",
"vector_store_metadata": {},
"parameters": {},
"error": "<string>",
"processing_time_ms": 123
}
headers = {
"x-api-key": "<api-key>",
"x-selected-account-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'x-selected-account-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
content: {
chunks: [
{
content: '<string>',
blocks: [
{
type: '<string>',
content: '<string>',
bbox: {left: 123, top: 123, width: 123, height: 123},
confidence: 123,
page_number: 0
}
]
}
]
},
source_document_id: '<string>',
engine: '<string>',
parse_metadata: {source_id: '<string>', filename: '<string>', pages_processed: 123},
object: 'parse_result',
vector_store_metadata: {},
parameters: {},
error: '<string>',
processing_time_ms: 123
})
};
fetch('https://api.example.com/v1/projects/{project_id}/parse/upload-result', 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/v1/projects/{project_id}/parse/upload-result",
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([
'content' => [
'chunks' => [
[
'content' => '<string>',
'blocks' => [
[
'type' => '<string>',
'content' => '<string>',
'bbox' => [
'left' => 123,
'top' => 123,
'width' => 123,
'height' => 123
],
'confidence' => 123,
'page_number' => 0
]
]
]
]
],
'source_document_id' => '<string>',
'engine' => '<string>',
'parse_metadata' => [
'source_id' => '<string>',
'filename' => '<string>',
'pages_processed' => 123
],
'object' => 'parse_result',
'vector_store_metadata' => [
],
'parameters' => [
],
'error' => '<string>',
'processing_time_ms' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-selected-account-id: <api-key>"
],
]);
$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.example.com/v1/projects/{project_id}/parse/upload-result"
payload := strings.NewReader("{\n \"content\": {\n \"chunks\": [\n {\n \"content\": \"<string>\",\n \"blocks\": [\n {\n \"type\": \"<string>\",\n \"content\": \"<string>\",\n \"bbox\": {\n \"left\": 123,\n \"top\": 123,\n \"width\": 123,\n \"height\": 123\n },\n \"confidence\": 123,\n \"page_number\": 0\n }\n ]\n }\n ]\n },\n \"source_document_id\": \"<string>\",\n \"engine\": \"<string>\",\n \"parse_metadata\": {\n \"source_id\": \"<string>\",\n \"filename\": \"<string>\",\n \"pages_processed\": 123\n },\n \"object\": \"parse_result\",\n \"vector_store_metadata\": {},\n \"parameters\": {},\n \"error\": \"<string>\",\n \"processing_time_ms\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-selected-account-id", "<api-key>")
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.example.com/v1/projects/{project_id}/parse/upload-result")
.header("x-api-key", "<api-key>")
.header("x-selected-account-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"content\": {\n \"chunks\": [\n {\n \"content\": \"<string>\",\n \"blocks\": [\n {\n \"type\": \"<string>\",\n \"content\": \"<string>\",\n \"bbox\": {\n \"left\": 123,\n \"top\": 123,\n \"width\": 123,\n \"height\": 123\n },\n \"confidence\": 123,\n \"page_number\": 0\n }\n ]\n }\n ]\n },\n \"source_document_id\": \"<string>\",\n \"engine\": \"<string>\",\n \"parse_metadata\": {\n \"source_id\": \"<string>\",\n \"filename\": \"<string>\",\n \"pages_processed\": 123\n },\n \"object\": \"parse_result\",\n \"vector_store_metadata\": {},\n \"parameters\": {},\n \"error\": \"<string>\",\n \"processing_time_ms\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/projects/{project_id}/parse/upload-result")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["x-selected-account-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": {\n \"chunks\": [\n {\n \"content\": \"<string>\",\n \"blocks\": [\n {\n \"type\": \"<string>\",\n \"content\": \"<string>\",\n \"bbox\": {\n \"left\": 123,\n \"top\": 123,\n \"width\": 123,\n \"height\": 123\n },\n \"confidence\": 123,\n \"page_number\": 0\n }\n ]\n }\n ]\n },\n \"source_document_id\": \"<string>\",\n \"engine\": \"<string>\",\n \"parse_metadata\": {\n \"source_id\": \"<string>\",\n \"filename\": \"<string>\",\n \"pages_processed\": 123\n },\n \"object\": \"parse_result\",\n \"vector_store_metadata\": {},\n \"parameters\": {},\n \"error\": \"<string>\",\n \"processing_time_ms\": 123\n}"
response = http.request(request)
puts response.read_body{
"source_document_id": "<string>",
"engine": "<string>",
"parse_metadata": {
"source_id": "<string>",
"filename": "<string>",
"pages_processed": 123
},
"id": "<string>",
"project_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"content": {
"chunks": [
{
"content": "<string>",
"blocks": [
{
"type": "<string>",
"content": "<string>",
"bbox": {
"left": 123,
"top": 123,
"width": 123,
"height": 123
},
"confidence": 123,
"page_number": 0
}
]
}
]
},
"object": "parse_result",
"vector_store_metadata": {},
"parameters": {},
"error": "<string>",
"processing_time_ms": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
API key for authentication
Selected Account ID
Path Parameters
Body
Entity for custom parse results.
Array of chunks from parsing
Show child attributes
Show child attributes
Source document ID that was parsed
Engine used for parsing
Parse result metadata
Show child attributes
Show child attributes
"parse_result"Metadata to populate into the vector store to filter on when searching
Show child attributes
Show child attributes
Parameters used during parsing
Error message if parsing had issues
Processing time in milliseconds
Response
Successful Response
Parse result response model representing a completed parse operation.
Source document ID that was parsed
Engine used for parsing
Parse result metadata
Show child attributes
Show child attributes
ID of the entity
ID of the project
When the parse result was created
Parsed files, returned only if requested
Show child attributes
Show child attributes
"parse_result"Metadata to populate into the vector store to filter on when searching
Show child attributes
Show child attributes
Parameters used during parsing
Error message if parsing had issues
Processing time in milliseconds

