This guide demonstrates how to upload documents to DocFlow using file URLs via REST API.
Compared to direct file upload, URL upload is more suitable for processing remote files or batch processing scenarios.
DocFlow supports uploading documents via file URLs without requiring local file storage. This approach is particularly suitable for:
- Processing files on remote servers
- Batch processing multiple file URLs
- Reducing local storage and network transmission overhead
01 Single File URL Upload
Submit file URL list using application/json format:
02 Batch URL Upload
A single request can upload multiple file URLs, supporting up to 10 files:
03 Parameter Description
Required Parameters
Request Body Parameters
urls: File URL list
- Type: String array
- Limit: Maximum 10 URLs per request
- Format: Must be valid URLs starting with
http:// or https://
- File size: Each file maximum 100MB
Optional Parameters
Can be added in URL query parameters as needed:
category: File category (e.g., invoice)
batch_number: Batch number, auto-generated if not provided
auto_verify_vat: Whether to enable invoice verification, default false
split_flag: Whether to perform file splitting, default false (see File Splitting chapter)
crop_flag: Whether to perform multi-image cropping, default false (see Multi-image Cropping chapter)
target_process: Target processing type, optional classify or extract
04 URL Requirements
- Must start with
http:// or https://
- URL must be publicly accessible (no authentication required)
- Server must support HTTP GET requests
File Requirements
- File format: Supports all formats listed in File Format Support
- File size: Single file not exceeding 100MB
- File pages: Multi-page documents not exceeding 1000 pages
Example URLs
The response format after successful URL upload is the same as regular file upload:
06 Query Processing Results
After upload completion, use the returned batch_number to query processing results: