Upload a file to the server, this will return a presigned upload url to be used for the upload. The presignedUploadURL is valid for 3600 seconds (1 hour) and can be used multiple times.
The input should contain the following information:
- fileName: the name of the file to be uploaded
- fileType: the type of the file to be uploaded
- isSplit: whether the file is a split file or not
- callbackURL: the url that will be called after the file is uploaded
- ocrModel: the ocr model to be used for the file processing
- schemaLocking: whether the schema should be locked after the file is uploaded, must be one of true or false
Initiates the file upload process by generating a presigned upload URL. This endpoint returns a secure, time-limited URL that allows direct file upload to cloud storage without exposing server credentials. The file will be processed according to the specified configuration after upload completion.
How It Works
- Request Upload URL: Submit file metadata to this endpoint
- Receive Presigned URL: Get a secure upload URL valid for 1 hour
- Upload File: Use the presigned URL to upload your file directly to storage
- Processing: File is automatically processed with specified OCR model and schema
- Callback (optional): Receive notification when processing is complete
Request Parameters
Request Body
The request body must contain a JSON object with the following properties:
Property | Type | Required | Description |
---|---|---|---|
fileName | string | Yes | Original name of the file including extension (e.g., "document.pdf") |
fileType | string | Yes | MIME type of the file (e.g., "application/pdf", "image/jpeg") |
isSplit | boolean | Yes | Whether the file should be processed as separate pages/sections |
callbackURL | string | No | HTTP endpoint to receive processing completion notifications |
ocrModel | string | No | OCR engine to use for text extraction. Available models vary by plan |
schemaLocking | boolean | Yes | Whether to lock the schema after processing. Must be true or false |
Responses
{
"s3Path": "s3://bucket/upload/file.txt",
"presignedUploadURL": "https://s3.amazonaws.com/bucket/upload/file.txt?AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE&Signature=1%2F6%2BN7Z6h%2F7oV7Z6i%2F9oV7Z4%3D&Expires=3600",
"uploadId": "f2538513-f0b9-4aa8-9c57-bc0a85c77de6",
"callbackURL": "https://example.com/callback",
"ocrModel": "Beethoven_ENG_G5.0",
"schemaLocking": true
}