Parse Document (Async)
curl --request POST \
--url https://platform.aifano.com/parse_async \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "<string>",
"async": {
"priority": false,
"webhook": {
"url": "<string>"
},
"metadata": "<unknown>"
},
"enhance": {
"agentic": [],
"summarize_figures": true
},
"retrieval": {
"chunking": {
"chunk_mode": "disabled",
"chunk_size": 123
},
"filter_blocks": [],
"embedding_optimized": false
},
"formatting": {
"add_page_markers": false,
"table_output_format": "dynamic",
"merge_tables": false,
"include": []
},
"spreadsheet": {
"split_large_tables": {
"enabled": true,
"size": 50
},
"clustering": "accurate"
},
"settings": {
"ocr_system": "standard",
"extraction_mode": "hybrid",
"force_url_result": false,
"return_ocr_data": false,
"return_images": [],
"page_range": {
"start": 123,
"end": 123
},
"timeout": 123,
"document_password": "<string>"
}
}
'import requests
url = "https://platform.aifano.com/parse_async"
payload = {
"input": "<string>",
"async": {
"priority": False,
"webhook": { "url": "<string>" },
"metadata": "<unknown>"
},
"enhance": {
"agentic": [],
"summarize_figures": True
},
"retrieval": {
"chunking": {
"chunk_mode": "disabled",
"chunk_size": 123
},
"filter_blocks": [],
"embedding_optimized": False
},
"formatting": {
"add_page_markers": False,
"table_output_format": "dynamic",
"merge_tables": False,
"include": []
},
"spreadsheet": {
"split_large_tables": {
"enabled": True,
"size": 50
},
"clustering": "accurate"
},
"settings": {
"ocr_system": "standard",
"extraction_mode": "hybrid",
"force_url_result": False,
"return_ocr_data": False,
"return_images": [],
"page_range": {
"start": 123,
"end": 123
},
"timeout": 123,
"document_password": "<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({
input: '<string>',
async: {priority: false, webhook: {url: '<string>'}, metadata: '<unknown>'},
enhance: {agentic: [], summarize_figures: true},
retrieval: {
chunking: {chunk_mode: 'disabled', chunk_size: 123},
filter_blocks: [],
embedding_optimized: false
},
formatting: {
add_page_markers: false,
table_output_format: 'dynamic',
merge_tables: false,
include: []
},
spreadsheet: {split_large_tables: {enabled: true, size: 50}, clustering: 'accurate'},
settings: {
ocr_system: 'standard',
extraction_mode: 'hybrid',
force_url_result: false,
return_ocr_data: false,
return_images: [],
page_range: {start: 123, end: 123},
timeout: 123,
document_password: '<string>'
}
})
};
fetch('https://platform.aifano.com/parse_async', 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://platform.aifano.com/parse_async",
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([
'input' => '<string>',
'async' => [
'priority' => false,
'webhook' => [
'url' => '<string>'
],
'metadata' => '<unknown>'
],
'enhance' => [
'agentic' => [
],
'summarize_figures' => true
],
'retrieval' => [
'chunking' => [
'chunk_mode' => 'disabled',
'chunk_size' => 123
],
'filter_blocks' => [
],
'embedding_optimized' => false
],
'formatting' => [
'add_page_markers' => false,
'table_output_format' => 'dynamic',
'merge_tables' => false,
'include' => [
]
],
'spreadsheet' => [
'split_large_tables' => [
'enabled' => true,
'size' => 50
],
'clustering' => 'accurate'
],
'settings' => [
'ocr_system' => 'standard',
'extraction_mode' => 'hybrid',
'force_url_result' => false,
'return_ocr_data' => false,
'return_images' => [
],
'page_range' => [
'start' => 123,
'end' => 123
],
'timeout' => 123,
'document_password' => '<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://platform.aifano.com/parse_async"
payload := strings.NewReader("{\n \"input\": \"<string>\",\n \"async\": {\n \"priority\": false,\n \"webhook\": {\n \"url\": \"<string>\"\n },\n \"metadata\": \"<unknown>\"\n },\n \"enhance\": {\n \"agentic\": [],\n \"summarize_figures\": true\n },\n \"retrieval\": {\n \"chunking\": {\n \"chunk_mode\": \"disabled\",\n \"chunk_size\": 123\n },\n \"filter_blocks\": [],\n \"embedding_optimized\": false\n },\n \"formatting\": {\n \"add_page_markers\": false,\n \"table_output_format\": \"dynamic\",\n \"merge_tables\": false,\n \"include\": []\n },\n \"spreadsheet\": {\n \"split_large_tables\": {\n \"enabled\": true,\n \"size\": 50\n },\n \"clustering\": \"accurate\"\n },\n \"settings\": {\n \"ocr_system\": \"standard\",\n \"extraction_mode\": \"hybrid\",\n \"force_url_result\": false,\n \"return_ocr_data\": false,\n \"return_images\": [],\n \"page_range\": {\n \"start\": 123,\n \"end\": 123\n },\n \"timeout\": 123,\n \"document_password\": \"<string>\"\n }\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://platform.aifano.com/parse_async")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": \"<string>\",\n \"async\": {\n \"priority\": false,\n \"webhook\": {\n \"url\": \"<string>\"\n },\n \"metadata\": \"<unknown>\"\n },\n \"enhance\": {\n \"agentic\": [],\n \"summarize_figures\": true\n },\n \"retrieval\": {\n \"chunking\": {\n \"chunk_mode\": \"disabled\",\n \"chunk_size\": 123\n },\n \"filter_blocks\": [],\n \"embedding_optimized\": false\n },\n \"formatting\": {\n \"add_page_markers\": false,\n \"table_output_format\": \"dynamic\",\n \"merge_tables\": false,\n \"include\": []\n },\n \"spreadsheet\": {\n \"split_large_tables\": {\n \"enabled\": true,\n \"size\": 50\n },\n \"clustering\": \"accurate\"\n },\n \"settings\": {\n \"ocr_system\": \"standard\",\n \"extraction_mode\": \"hybrid\",\n \"force_url_result\": false,\n \"return_ocr_data\": false,\n \"return_images\": [],\n \"page_range\": {\n \"start\": 123,\n \"end\": 123\n },\n \"timeout\": 123,\n \"document_password\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.aifano.com/parse_async")
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 \"input\": \"<string>\",\n \"async\": {\n \"priority\": false,\n \"webhook\": {\n \"url\": \"<string>\"\n },\n \"metadata\": \"<unknown>\"\n },\n \"enhance\": {\n \"agentic\": [],\n \"summarize_figures\": true\n },\n \"retrieval\": {\n \"chunking\": {\n \"chunk_mode\": \"disabled\",\n \"chunk_size\": 123\n },\n \"filter_blocks\": [],\n \"embedding_optimized\": false\n },\n \"formatting\": {\n \"add_page_markers\": false,\n \"table_output_format\": \"dynamic\",\n \"merge_tables\": false,\n \"include\": []\n },\n \"spreadsheet\": {\n \"split_large_tables\": {\n \"enabled\": true,\n \"size\": 50\n },\n \"clustering\": \"accurate\"\n },\n \"settings\": {\n \"ocr_system\": \"standard\",\n \"extraction_mode\": \"hybrid\",\n \"force_url_result\": false,\n \"return_ocr_data\": false,\n \"return_images\": [],\n \"page_range\": {\n \"start\": 123,\n \"end\": 123\n },\n \"timeout\": 123,\n \"document_password\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"detail": [
{
"loc": [
"<unknown>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Document Processing
Parse Document (Async)
Asynchronously parse a document. Returns a job_id that can be polled via GET /job/.
POST
/
parse_async
Parse Document (Async)
curl --request POST \
--url https://platform.aifano.com/parse_async \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "<string>",
"async": {
"priority": false,
"webhook": {
"url": "<string>"
},
"metadata": "<unknown>"
},
"enhance": {
"agentic": [],
"summarize_figures": true
},
"retrieval": {
"chunking": {
"chunk_mode": "disabled",
"chunk_size": 123
},
"filter_blocks": [],
"embedding_optimized": false
},
"formatting": {
"add_page_markers": false,
"table_output_format": "dynamic",
"merge_tables": false,
"include": []
},
"spreadsheet": {
"split_large_tables": {
"enabled": true,
"size": 50
},
"clustering": "accurate"
},
"settings": {
"ocr_system": "standard",
"extraction_mode": "hybrid",
"force_url_result": false,
"return_ocr_data": false,
"return_images": [],
"page_range": {
"start": 123,
"end": 123
},
"timeout": 123,
"document_password": "<string>"
}
}
'import requests
url = "https://platform.aifano.com/parse_async"
payload = {
"input": "<string>",
"async": {
"priority": False,
"webhook": { "url": "<string>" },
"metadata": "<unknown>"
},
"enhance": {
"agentic": [],
"summarize_figures": True
},
"retrieval": {
"chunking": {
"chunk_mode": "disabled",
"chunk_size": 123
},
"filter_blocks": [],
"embedding_optimized": False
},
"formatting": {
"add_page_markers": False,
"table_output_format": "dynamic",
"merge_tables": False,
"include": []
},
"spreadsheet": {
"split_large_tables": {
"enabled": True,
"size": 50
},
"clustering": "accurate"
},
"settings": {
"ocr_system": "standard",
"extraction_mode": "hybrid",
"force_url_result": False,
"return_ocr_data": False,
"return_images": [],
"page_range": {
"start": 123,
"end": 123
},
"timeout": 123,
"document_password": "<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({
input: '<string>',
async: {priority: false, webhook: {url: '<string>'}, metadata: '<unknown>'},
enhance: {agentic: [], summarize_figures: true},
retrieval: {
chunking: {chunk_mode: 'disabled', chunk_size: 123},
filter_blocks: [],
embedding_optimized: false
},
formatting: {
add_page_markers: false,
table_output_format: 'dynamic',
merge_tables: false,
include: []
},
spreadsheet: {split_large_tables: {enabled: true, size: 50}, clustering: 'accurate'},
settings: {
ocr_system: 'standard',
extraction_mode: 'hybrid',
force_url_result: false,
return_ocr_data: false,
return_images: [],
page_range: {start: 123, end: 123},
timeout: 123,
document_password: '<string>'
}
})
};
fetch('https://platform.aifano.com/parse_async', 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://platform.aifano.com/parse_async",
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([
'input' => '<string>',
'async' => [
'priority' => false,
'webhook' => [
'url' => '<string>'
],
'metadata' => '<unknown>'
],
'enhance' => [
'agentic' => [
],
'summarize_figures' => true
],
'retrieval' => [
'chunking' => [
'chunk_mode' => 'disabled',
'chunk_size' => 123
],
'filter_blocks' => [
],
'embedding_optimized' => false
],
'formatting' => [
'add_page_markers' => false,
'table_output_format' => 'dynamic',
'merge_tables' => false,
'include' => [
]
],
'spreadsheet' => [
'split_large_tables' => [
'enabled' => true,
'size' => 50
],
'clustering' => 'accurate'
],
'settings' => [
'ocr_system' => 'standard',
'extraction_mode' => 'hybrid',
'force_url_result' => false,
'return_ocr_data' => false,
'return_images' => [
],
'page_range' => [
'start' => 123,
'end' => 123
],
'timeout' => 123,
'document_password' => '<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://platform.aifano.com/parse_async"
payload := strings.NewReader("{\n \"input\": \"<string>\",\n \"async\": {\n \"priority\": false,\n \"webhook\": {\n \"url\": \"<string>\"\n },\n \"metadata\": \"<unknown>\"\n },\n \"enhance\": {\n \"agentic\": [],\n \"summarize_figures\": true\n },\n \"retrieval\": {\n \"chunking\": {\n \"chunk_mode\": \"disabled\",\n \"chunk_size\": 123\n },\n \"filter_blocks\": [],\n \"embedding_optimized\": false\n },\n \"formatting\": {\n \"add_page_markers\": false,\n \"table_output_format\": \"dynamic\",\n \"merge_tables\": false,\n \"include\": []\n },\n \"spreadsheet\": {\n \"split_large_tables\": {\n \"enabled\": true,\n \"size\": 50\n },\n \"clustering\": \"accurate\"\n },\n \"settings\": {\n \"ocr_system\": \"standard\",\n \"extraction_mode\": \"hybrid\",\n \"force_url_result\": false,\n \"return_ocr_data\": false,\n \"return_images\": [],\n \"page_range\": {\n \"start\": 123,\n \"end\": 123\n },\n \"timeout\": 123,\n \"document_password\": \"<string>\"\n }\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://platform.aifano.com/parse_async")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": \"<string>\",\n \"async\": {\n \"priority\": false,\n \"webhook\": {\n \"url\": \"<string>\"\n },\n \"metadata\": \"<unknown>\"\n },\n \"enhance\": {\n \"agentic\": [],\n \"summarize_figures\": true\n },\n \"retrieval\": {\n \"chunking\": {\n \"chunk_mode\": \"disabled\",\n \"chunk_size\": 123\n },\n \"filter_blocks\": [],\n \"embedding_optimized\": false\n },\n \"formatting\": {\n \"add_page_markers\": false,\n \"table_output_format\": \"dynamic\",\n \"merge_tables\": false,\n \"include\": []\n },\n \"spreadsheet\": {\n \"split_large_tables\": {\n \"enabled\": true,\n \"size\": 50\n },\n \"clustering\": \"accurate\"\n },\n \"settings\": {\n \"ocr_system\": \"standard\",\n \"extraction_mode\": \"hybrid\",\n \"force_url_result\": false,\n \"return_ocr_data\": false,\n \"return_images\": [],\n \"page_range\": {\n \"start\": 123,\n \"end\": 123\n },\n \"timeout\": 123,\n \"document_password\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.aifano.com/parse_async")
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 \"input\": \"<string>\",\n \"async\": {\n \"priority\": false,\n \"webhook\": {\n \"url\": \"<string>\"\n },\n \"metadata\": \"<unknown>\"\n },\n \"enhance\": {\n \"agentic\": [],\n \"summarize_figures\": true\n },\n \"retrieval\": {\n \"chunking\": {\n \"chunk_mode\": \"disabled\",\n \"chunk_size\": 123\n },\n \"filter_blocks\": [],\n \"embedding_optimized\": false\n },\n \"formatting\": {\n \"add_page_markers\": false,\n \"table_output_format\": \"dynamic\",\n \"merge_tables\": false,\n \"include\": []\n },\n \"spreadsheet\": {\n \"split_large_tables\": {\n \"enabled\": true,\n \"size\": 50\n },\n \"clustering\": \"accurate\"\n },\n \"settings\": {\n \"ocr_system\": \"standard\",\n \"extraction_mode\": \"hybrid\",\n \"force_url_result\": false,\n \"return_ocr_data\": false,\n \"return_images\": [],\n \"page_range\": {\n \"start\": 123,\n \"end\": 123\n },\n \"timeout\": 123,\n \"document_password\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"detail": [
{
"loc": [
"<unknown>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
API key authentication. Use your Aifano API key (starts with ak_live_) as the Bearer token.
Body
application/json
The document to process. Accepts: (1) a public URL, (2) a presigned S3 URL, (3) an aifano://file_id from /upload, or (4) a jobid://job_id from a previous /parse call.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Job created
Job ID for polling via GET /job/{job_id}.
⌘I