curl -X GET "https://prod.visionapi.unsiloed.ai/extract/{job_id}" \
-H "api-key: your-api-key"
{
"job_id": "36adb597-3c2c-43e8-a259-410553291f47",
"status": "completed",
"file_name": null,
"created_at": "2026-03-10T16:41:58.407237+00:00",
"updated_at": "2026-03-10T16:42:26.232009+00:00",
"metadata": {
"order": ["EIN", "Address", "Officers", "Organisation", "telephone_number"],
"schema": {
"type": "object",
"required": ["EIN", "Address", "Officers", "Organisation", "telephone_number"],
"properties": {
"EIN": {
"type": "string",
"description": "employee identification number"
},
"Address": {
"type": "string",
"description": "Full Address of organisation"
},
"Officers": {
"type": "array",
"items": {
"type": "object",
"required": ["Officers"],
"properties": {
"Officers": {
"type": "string",
"description": "List of officers"
}
},
"additionalProperties": false
},
"description": "List of officers"
},
"Organisation": {
"type": "string",
"description": "Name of organisation"
},
"telephone_number": {
"type": "string",
"description": "telephone number"
}
},
"additionalProperties": false
},
"page_count": 27
},
"result": {
"EIN": {
"score": 0.98,
"value": "02-0624253",
"bboxes": [
{
"bbox": [441, 131, 520, 147],
"text": "02-0624253",
"type": "segment",
"confidence": 0.98,
"page_width": 672.0,
"page_height": 1028.88
}
],
"page_no": 2
},
"Address": {
"score": 0.97,
"value": "602 S OGDEN ST DENVER, CO 80209",
"bboxes": [
{
"bbox": [84, 201, 181, 216],
"text": "602 S OGDEN ST DENVER, CO 80209",
"type": "segment",
"confidence": 0.97,
"page_width": 672.0,
"page_height": 1028.88
}
],
"page_no": 2
},
"Officers": {
"score": 0.98,
"value": [
{
"bboxes": [
{
"bbox": [0, 446, 107, 465],
"type": "segment",
"confidence": 0.98,
"page_width": 672.0,
"page_height": 843.36
}
],
"page_no": 7,
"Officers": "KIMBERLY TROGGIO"
}
],
"page_no": 8
},
"Organisation": {
"score": 0.99,
"value": "GLOBAL HUMANITARIAN EXPEDITIONS",
"bboxes": [
{
"bbox": [84, 120, 239, 135],
"text": "GLOBAL HUMANITARIAN EXPEDITIONS",
"type": "segment",
"confidence": 0.99,
"page_width": 672.0,
"page_height": 1028.88
}
],
"page_no": 2
},
"telephone_number": {
"score": 0.98,
"value": "(303) 858-8857",
"bboxes": [
{
"bbox": [441, 185, 533, 200],
"text": "(303) 858-8857",
"type": "segment",
"confidence": 0.98,
"page_width": 672.0,
"page_height": 1028.88
}
],
"page_no": 2
}
}
}
Retrieve the results of a completed processing job
curl -X GET "https://prod.visionapi.unsiloed.ai/extract/{job_id}" \
-H "api-key: your-api-key"
{
"job_id": "36adb597-3c2c-43e8-a259-410553291f47",
"status": "completed",
"file_name": null,
"created_at": "2026-03-10T16:41:58.407237+00:00",
"updated_at": "2026-03-10T16:42:26.232009+00:00",
"metadata": {
"order": ["EIN", "Address", "Officers", "Organisation", "telephone_number"],
"schema": {
"type": "object",
"required": ["EIN", "Address", "Officers", "Organisation", "telephone_number"],
"properties": {
"EIN": {
"type": "string",
"description": "employee identification number"
},
"Address": {
"type": "string",
"description": "Full Address of organisation"
},
"Officers": {
"type": "array",
"items": {
"type": "object",
"required": ["Officers"],
"properties": {
"Officers": {
"type": "string",
"description": "List of officers"
}
},
"additionalProperties": false
},
"description": "List of officers"
},
"Organisation": {
"type": "string",
"description": "Name of organisation"
},
"telephone_number": {
"type": "string",
"description": "telephone number"
}
},
"additionalProperties": false
},
"page_count": 27
},
"result": {
"EIN": {
"score": 0.98,
"value": "02-0624253",
"bboxes": [
{
"bbox": [441, 131, 520, 147],
"text": "02-0624253",
"type": "segment",
"confidence": 0.98,
"page_width": 672.0,
"page_height": 1028.88
}
],
"page_no": 2
},
"Address": {
"score": 0.97,
"value": "602 S OGDEN ST DENVER, CO 80209",
"bboxes": [
{
"bbox": [84, 201, 181, 216],
"text": "602 S OGDEN ST DENVER, CO 80209",
"type": "segment",
"confidence": 0.97,
"page_width": 672.0,
"page_height": 1028.88
}
],
"page_no": 2
},
"Officers": {
"score": 0.98,
"value": [
{
"bboxes": [
{
"bbox": [0, 446, 107, 465],
"type": "segment",
"confidence": 0.98,
"page_width": 672.0,
"page_height": 843.36
}
],
"page_no": 7,
"Officers": "KIMBERLY TROGGIO"
}
],
"page_no": 8
},
"Organisation": {
"score": 0.99,
"value": "GLOBAL HUMANITARIAN EXPEDITIONS",
"bboxes": [
{
"bbox": [84, 120, 239, 135],
"text": "GLOBAL HUMANITARIAN EXPEDITIONS",
"type": "segment",
"confidence": 0.99,
"page_width": 672.0,
"page_height": 1028.88
}
],
"page_no": 2
},
"telephone_number": {
"score": 0.98,
"value": "(303) 858-8857",
"bboxes": [
{
"bbox": [441, 185, 533, 200],
"text": "(303) 858-8857",
"type": "segment",
"confidence": 0.98,
"page_width": 672.0,
"page_height": 1028.88
}
],
"page_no": 2
}
}
}
order: Array of extracted field names in orderschema: The JSON schema used for extractionpage_count: Number of pages in the documentscore: Confidence score (0-1) for the extractionvalue: The extracted value (string for scalar fields, array of objects for array fields)bboxes: Array of bounding box objects containing:
bbox: [x1, y1, x2, y2] coordinatestext: The extracted text snippettype: Detection type (e.g., "segment")confidence: Confidence score for this specific bounding boxpage_width: Width of the source page in pointspage_height: Height of the source page in pointspage_no: Page number where the value was found (1-indexed)value is an array of objects, each containing its own bboxes and page_no alongside the extracted data.curl -X GET "https://prod.visionapi.unsiloed.ai/extract/{job_id}" \
-H "api-key: your-api-key"
{
"job_id": "36adb597-3c2c-43e8-a259-410553291f47",
"status": "completed",
"file_name": null,
"created_at": "2026-03-10T16:41:58.407237+00:00",
"updated_at": "2026-03-10T16:42:26.232009+00:00",
"metadata": {
"order": ["EIN", "Address", "Officers", "Organisation", "telephone_number"],
"schema": {
"type": "object",
"required": ["EIN", "Address", "Officers", "Organisation", "telephone_number"],
"properties": {
"EIN": {
"type": "string",
"description": "employee identification number"
},
"Address": {
"type": "string",
"description": "Full Address of organisation"
},
"Officers": {
"type": "array",
"items": {
"type": "object",
"required": ["Officers"],
"properties": {
"Officers": {
"type": "string",
"description": "List of officers"
}
},
"additionalProperties": false
},
"description": "List of officers"
},
"Organisation": {
"type": "string",
"description": "Name of organisation"
},
"telephone_number": {
"type": "string",
"description": "telephone number"
}
},
"additionalProperties": false
},
"page_count": 27
},
"result": {
"EIN": {
"score": 0.98,
"value": "02-0624253",
"bboxes": [
{
"bbox": [441, 131, 520, 147],
"text": "02-0624253",
"type": "segment",
"confidence": 0.98,
"page_width": 672.0,
"page_height": 1028.88
}
],
"page_no": 2
},
"Address": {
"score": 0.97,
"value": "602 S OGDEN ST DENVER, CO 80209",
"bboxes": [
{
"bbox": [84, 201, 181, 216],
"text": "602 S OGDEN ST DENVER, CO 80209",
"type": "segment",
"confidence": 0.97,
"page_width": 672.0,
"page_height": 1028.88
}
],
"page_no": 2
},
"Officers": {
"score": 0.98,
"value": [
{
"bboxes": [
{
"bbox": [0, 446, 107, 465],
"type": "segment",
"confidence": 0.98,
"page_width": 672.0,
"page_height": 843.36
}
],
"page_no": 7,
"Officers": "KIMBERLY TROGGIO"
}
],
"page_no": 8
},
"Organisation": {
"score": 0.99,
"value": "GLOBAL HUMANITARIAN EXPEDITIONS",
"bboxes": [
{
"bbox": [84, 120, 239, 135],
"text": "GLOBAL HUMANITARIAN EXPEDITIONS",
"type": "segment",
"confidence": 0.99,
"page_width": 672.0,
"page_height": 1028.88
}
],
"page_no": 2
},
"telephone_number": {
"score": 0.98,
"value": "(303) 858-8857",
"bboxes": [
{
"bbox": [441, 185, 533, 200],
"text": "(303) 858-8857",
"type": "segment",
"confidence": 0.98,
"page_width": 672.0,
"page_height": 1028.88
}
],
"page_no": 2
}
}
}
import requests
import time
import json
def process_document_with_results(file_path, schema, api_key):
"""Complete workflow: submit job, wait for completion, get results"""
headers = {"api-key": api_key}
# Step 1: Submit extraction job
files = {"pdf_file": open(file_path, "rb")}
data = {"schema_data": json.dumps(schema)}
response = requests.post(
"https://prod.visionapi.unsiloed.ai/v2/extract",
files=files,
data=data,
headers=headers
)
if response.status_code != 200:
raise Exception(f"Failed to submit job: {response.text}")
job_id = response.json()["job_id"]
print(f"Job submitted: {job_id}")
# Step 2: Poll for completion
while True:
status_response = requests.get(
f"https://prod.visionapi.unsiloed.ai/extract/{job_id}",
headers=headers
)
if status_response.status_code != 200:
raise Exception(f"Failed to check status: {status_response.text}")
job = status_response.json()
status = job["status"]
print(f"Job status: {status}")
if status == "COMPLETED" or status == "completed":
break
elif status == "FAILED" or status == "failed":
raise Exception(f"Job failed: {job.get('error', 'Unknown error')}")
time.sleep(5) # Wait 5 seconds before checking again
# Step 3: Get results
results_response = requests.get(
f"https://prod.visionapi.unsiloed.ai/extract/{job_id}",
headers=headers
)
if results_response.status_code != 200:
raise Exception(f"Failed to get results: {results_response.text}")
return results_response.json()
# Usage example
schema = {
"type": "object",
"properties": {
"company_name": {
"type": "string",
"description": "Name of the company"
},
"total_amount": {
"type": "number",
"description": "Total financial amount"
}
},
"required": ["company_name"],
"additionalProperties": False
}
try:
results = process_document_with_results("document.pdf", schema, "your-api-key")
print("Extraction completed!")
print("Results:", results)
except Exception as e:
print(f"Error: {e}")
result object contains:
score: A confidence score between 0 and 1 indicating extraction confidencevalue: The extracted value — a string for scalar fields, or an array of objects for array fieldsbboxes: Array of bounding box objects indicating where the value was foundpage_no: The page number where the value was located (1-indexed)value is an array where each element contains:
bboxes: Bounding boxes specific to that array elementpage_no: Page number for that array elementbbox: [x1, y1, x2, y2] coordinates where:
x1, y1: Top-left corner coordinatesx2, y2: Bottom-right corner coordinatestext: The extracted text snippet at that locationtype: Detection type (e.g., "segment")confidence: Confidence score for this specific bounding boxpage_width: Width of the source page in pointspage_height: Height of the source page in pointsJob Still Processing (400)
Job Failed (500)
Results Not Found (404)
Job Not Found (404)