curl --request POST \
--url https://api.example.com/v1/projects/{project_id}/parse \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-selected-account-id: <api-key>' \
--data '
{
"source_document_id": "<string>",
"parameters": {
"options": {
"chunking": {
"chunk_mode": "variable",
"chunk_size": 123
}
},
"engine": "reducto",
"chunking_options": {
"strategy": "token_size",
"chunk_size": 512,
"chunk_overlap": 50,
"encoding_name": "cl100k_base"
},
"vector_store_metadata": {},
"advanced_options": {},
"experimental_options": {},
"priority": false
}
}
'import requests
url = "https://api.example.com/v1/projects/{project_id}/parse"
payload = {
"source_document_id": "<string>",
"parameters": {
"options": { "chunking": {
"chunk_mode": "variable",
"chunk_size": 123
} },
"engine": "reducto",
"chunking_options": {
"strategy": "token_size",
"chunk_size": 512,
"chunk_overlap": 50,
"encoding_name": "cl100k_base"
},
"vector_store_metadata": {},
"advanced_options": {},
"experimental_options": {},
"priority": False
}
}
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({
source_document_id: '<string>',
parameters: {
options: {chunking: {chunk_mode: 'variable', chunk_size: 123}},
engine: 'reducto',
chunking_options: {
strategy: 'token_size',
chunk_size: 512,
chunk_overlap: 50,
encoding_name: 'cl100k_base'
},
vector_store_metadata: {},
advanced_options: {},
experimental_options: {},
priority: false
}
})
};
fetch('https://api.example.com/v1/projects/{project_id}/parse', 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",
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([
'source_document_id' => '<string>',
'parameters' => [
'options' => [
'chunking' => [
'chunk_mode' => 'variable',
'chunk_size' => 123
]
],
'engine' => 'reducto',
'chunking_options' => [
'strategy' => 'token_size',
'chunk_size' => 512,
'chunk_overlap' => 50,
'encoding_name' => 'cl100k_base'
],
'vector_store_metadata' => [
],
'advanced_options' => [
],
'experimental_options' => [
],
'priority' => false
]
]),
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"
payload := strings.NewReader("{\n \"source_document_id\": \"<string>\",\n \"parameters\": {\n \"options\": {\n \"chunking\": {\n \"chunk_mode\": \"variable\",\n \"chunk_size\": 123\n }\n },\n \"engine\": \"reducto\",\n \"chunking_options\": {\n \"strategy\": \"token_size\",\n \"chunk_size\": 512,\n \"chunk_overlap\": 50,\n \"encoding_name\": \"cl100k_base\"\n },\n \"vector_store_metadata\": {},\n \"advanced_options\": {},\n \"experimental_options\": {},\n \"priority\": false\n }\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")
.header("x-api-key", "<api-key>")
.header("x-selected-account-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"source_document_id\": \"<string>\",\n \"parameters\": {\n \"options\": {\n \"chunking\": {\n \"chunk_mode\": \"variable\",\n \"chunk_size\": 123\n }\n },\n \"engine\": \"reducto\",\n \"chunking_options\": {\n \"strategy\": \"token_size\",\n \"chunk_size\": 512,\n \"chunk_overlap\": 50,\n \"encoding_name\": \"cl100k_base\"\n },\n \"vector_store_metadata\": {},\n \"advanced_options\": {},\n \"experimental_options\": {},\n \"priority\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/projects/{project_id}/parse")
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 \"source_document_id\": \"<string>\",\n \"parameters\": {\n \"options\": {\n \"chunking\": {\n \"chunk_mode\": \"variable\",\n \"chunk_size\": 123\n }\n },\n \"engine\": \"reducto\",\n \"chunking_options\": {\n \"strategy\": \"token_size\",\n \"chunk_size\": 512,\n \"chunk_overlap\": 50,\n \"encoding_name\": \"cl100k_base\"\n },\n \"vector_store_metadata\": {},\n \"advanced_options\": {},\n \"experimental_options\": {},\n \"priority\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"project_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"object": "job",
"source_id": "<string>",
"correlation_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"result": {},
"progress": {
"total": 123,
"succeeded": 123,
"failed": 123,
"cancelled": 123,
"pending": 123,
"child_jobs": [
{
"source_document_id": "<string>",
"job_id": "<string>",
"parse_result_id": "<string>",
"error": "<string>"
}
]
},
"error": "<string>",
"history": [
{
"step": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"status": "<string>",
"details": {}
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Create Parse Job
Create a parse job that will asynchronously process a document.
This endpoint initiates document parsing using the specified engine (default: Reducto). The operation is performed asynchronously via Temporal workflows.
Args: request: Parse job request with source document ID and parameters
Returns: Job entity that can be used to track progress
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 \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-selected-account-id: <api-key>' \
--data '
{
"source_document_id": "<string>",
"parameters": {
"options": {
"chunking": {
"chunk_mode": "variable",
"chunk_size": 123
}
},
"engine": "reducto",
"chunking_options": {
"strategy": "token_size",
"chunk_size": 512,
"chunk_overlap": 50,
"encoding_name": "cl100k_base"
},
"vector_store_metadata": {},
"advanced_options": {},
"experimental_options": {},
"priority": false
}
}
'import requests
url = "https://api.example.com/v1/projects/{project_id}/parse"
payload = {
"source_document_id": "<string>",
"parameters": {
"options": { "chunking": {
"chunk_mode": "variable",
"chunk_size": 123
} },
"engine": "reducto",
"chunking_options": {
"strategy": "token_size",
"chunk_size": 512,
"chunk_overlap": 50,
"encoding_name": "cl100k_base"
},
"vector_store_metadata": {},
"advanced_options": {},
"experimental_options": {},
"priority": False
}
}
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({
source_document_id: '<string>',
parameters: {
options: {chunking: {chunk_mode: 'variable', chunk_size: 123}},
engine: 'reducto',
chunking_options: {
strategy: 'token_size',
chunk_size: 512,
chunk_overlap: 50,
encoding_name: 'cl100k_base'
},
vector_store_metadata: {},
advanced_options: {},
experimental_options: {},
priority: false
}
})
};
fetch('https://api.example.com/v1/projects/{project_id}/parse', 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",
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([
'source_document_id' => '<string>',
'parameters' => [
'options' => [
'chunking' => [
'chunk_mode' => 'variable',
'chunk_size' => 123
]
],
'engine' => 'reducto',
'chunking_options' => [
'strategy' => 'token_size',
'chunk_size' => 512,
'chunk_overlap' => 50,
'encoding_name' => 'cl100k_base'
],
'vector_store_metadata' => [
],
'advanced_options' => [
],
'experimental_options' => [
],
'priority' => false
]
]),
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"
payload := strings.NewReader("{\n \"source_document_id\": \"<string>\",\n \"parameters\": {\n \"options\": {\n \"chunking\": {\n \"chunk_mode\": \"variable\",\n \"chunk_size\": 123\n }\n },\n \"engine\": \"reducto\",\n \"chunking_options\": {\n \"strategy\": \"token_size\",\n \"chunk_size\": 512,\n \"chunk_overlap\": 50,\n \"encoding_name\": \"cl100k_base\"\n },\n \"vector_store_metadata\": {},\n \"advanced_options\": {},\n \"experimental_options\": {},\n \"priority\": false\n }\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")
.header("x-api-key", "<api-key>")
.header("x-selected-account-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"source_document_id\": \"<string>\",\n \"parameters\": {\n \"options\": {\n \"chunking\": {\n \"chunk_mode\": \"variable\",\n \"chunk_size\": 123\n }\n },\n \"engine\": \"reducto\",\n \"chunking_options\": {\n \"strategy\": \"token_size\",\n \"chunk_size\": 512,\n \"chunk_overlap\": 50,\n \"encoding_name\": \"cl100k_base\"\n },\n \"vector_store_metadata\": {},\n \"advanced_options\": {},\n \"experimental_options\": {},\n \"priority\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/projects/{project_id}/parse")
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 \"source_document_id\": \"<string>\",\n \"parameters\": {\n \"options\": {\n \"chunking\": {\n \"chunk_mode\": \"variable\",\n \"chunk_size\": 123\n }\n },\n \"engine\": \"reducto\",\n \"chunking_options\": {\n \"strategy\": \"token_size\",\n \"chunk_size\": 512,\n \"chunk_overlap\": 50,\n \"encoding_name\": \"cl100k_base\"\n },\n \"vector_store_metadata\": {},\n \"advanced_options\": {},\n \"experimental_options\": {},\n \"priority\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"project_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"object": "job",
"source_id": "<string>",
"correlation_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"result": {},
"progress": {
"total": 123,
"succeeded": 123,
"failed": 123,
"cancelled": 123,
"pending": 123,
"child_jobs": [
{
"source_document_id": "<string>",
"job_id": "<string>",
"parse_result_id": "<string>",
"error": "<string>"
}
]
},
"error": "<string>",
"history": [
{
"step": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"status": "<string>",
"details": {}
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
API key for authentication
Selected Account ID
Path Parameters
Query Parameters
Enable Iris2 engine for beta testing
Body
Response
Successful Response
Job response model representing an asynchronous operation.
ID of the entity
ID of the project
Operation type (e.g., 'parse')
parse, batch_parse, extract, research, vector_store, chunk, summarization, create_index, update_index Current job status
pending, running, succeeded, partially_succeeded, failed, cancelled When the job was created
"job"Source document/file ID
Request correlation ID for tracing
When the job started processing
When the job completed
Job result payload when completed
Live progress payload (used by batch jobs)
Show child attributes
Show child attributes
Error message if job failed
Timeline of job execution events
Show child attributes
Show child attributes

