Batch upload
Add up to 50 documents in one call.
Base URL https://futuresmart.ai/document-intelligence/api · every request sends x-api-key. Samples read the key from DOCUMENT_INTELLIGENCE_API_KEY. All endpoints
Get upload URLs for many files
/v1/{knowledge_id}/upload-urls/batchGenerate presigned S3 URLs for multiple files in a single request. Returns a batch_id for tracking.
Credential Document Intelligence API key (x-api-key)
Path parameters
| Name | Type | Description |
|---|---|---|
knowledge_idrequired | string |
Request body · application/json
| Name | Type | Description |
|---|---|---|
filesrequired | array<BatchUploadFileRequest> | List of files to generate upload URLs for (1-50 items) |
↳ file_namerequired | string | Name of the file |
↳ content_typerequired | string | MIME type of the file |
user_id | string | null | User identifier (optional) |
Response · 200
| Name | Type | Description |
|---|---|---|
uploadsrequired | array<BatchUploadFileResponse> | List of upload URLs for each file |
↳ object_idrequired | string | Unique object identifier for the file |
↳ file_namerequired | string | Name of the file |
↳ presigned_urlrequired | string | Presigned URL for uploading the file |
↳ download_presigned_urlrequired | string | Presigned URL for downloading the file |
Other responses
422Validation Error
Example request body
{
"files": [
{
"file_name": "<file_name>",
"content_type": "<content_type>"
}
]
}Response shape (200)
{
"uploads": [
{
"object_id": "<object_id>",
"file_name": "<file_name>",
"presigned_url": "<presigned_url>",
"download_presigned_url": "<download_presigned_url>"
}
]
}Add many documents
/v1/{knowledge_id}/documents/batchProcess multiple files with shared configuration. All files inherit identical processing settings.
Can process files via direct upload (files parameter) or via URLs (file_urls parameter). Files can be uploaded via batch_upload_urls endpoint first, then their URLs are provided here for processing.
All configuration parameters are provided as form fields. If not provided, default values will be used.
Credential Document Intelligence API key (x-api-key)
Path parameters
| Name | Type | Description |
|---|---|---|
knowledge_idrequired | string |
Request body · multipart/form-data (optional)
| Name | Type | Description |
|---|---|---|
files | array<file> | null | Optional collection of files to upload and process |
file_urls | string | null | Comma-separated file URLs to process |
enable_chunking | boolean | Enable chunking (default: true) |
use_llama_parse | boolean | null | Deprecated — use document_processing_mode. Defaults to None so 'not sent' stays distinguishable from an explicit false. |
document_processing_mode | string | null | What the documents' content is like: auto (default — reads locally and detects), text_based, scanned, layout_aware, visual, or mixed. Applies to every file in the batch. |
chunk_size | integer | Chunk size for processing (default: 2000) |
transcript_provider | TranscribeUsing | Transcript provider: 'openai' or 'groq' (default: 'openai') |
Response · 200
| Name | Type | Description |
|---|---|---|
batch_idrequired | string | Unique batch identifier |
statusrequired | string | Batch status: 'processing' if any document is being processed, 'failed' if all failed |
messagerequired | string | Status message |
documentsrequired | array<BatchDocumentStatus> | List of documents with their status |
↳ object_idrequired | string | Object identifier for the document |
↳ file_namerequired | string | File name of the document |
↳ statusrequired | string | Processing status of the document |
↳ processing_duration_ms | number | null | Processing duration in milliseconds (completed_at - created_at) |
↳ error_detail | string | null | Error detail if status is 'failed' |
Other responses
422Validation Error
Response shape (200)
{
"batch_id": "<batch_id>",
"status": "<status>",
"message": "<message>",
"documents": [
{
"object_id": "<object_id>",
"file_name": "<file_name>",
"status": "<status>"
}
]
}Get a batch's status
/v1/{knowledge_id}/batch/{batch_id}/statusCheck processing status for all documents in a batch. Returns aggregated counts and individual document statuses.
Credential Document Intelligence API key (x-api-key)
Path parameters
| Name | Type | Description |
|---|---|---|
knowledge_idrequired | string | |
batch_idrequired | string | Batch identifier |
Response · 200
| Name | Type | Description |
|---|---|---|
batch_idrequired | string | Unique batch identifier |
totalrequired | integer | Total number of documents in the batch |
completedrequired | integer | Number of completed documents |
processingrequired | integer | Number of documents currently processing |
failedrequired | integer | Number of failed documents |
documentsrequired | array<BatchDocumentStatus> | List of documents with their status |
↳ object_idrequired | string | Object identifier for the document |
↳ file_namerequired | string | File name of the document |
↳ statusrequired | string | Processing status of the document |
↳ processing_duration_ms | number | null | Processing duration in milliseconds (completed_at - created_at) |
↳ error_detail | string | null | Error detail if status is 'failed' |
elapsed_since_created_ms | number | null | Milliseconds elapsed from batch creation to now |
Other responses
422Validation Error
Response shape (200)
{
"batch_id": "<batch_id>",
"total": 0,
"completed": 0,
"processing": 0,
"failed": 0,
"documents": [
{
"object_id": "<object_id>",
"file_name": "<file_name>",
"status": "<status>"
}
]
}