Submit a file
Changed onUpload a file to DocAI.
For best results, uploaded files should be whole documents (rather than pages, paragraphs or fragments).
The content type does not need to be specified, with the exception of eOCR files, which must use the content type application/eocr. If not provided, the content type will be automatically detected and returned in the attributes of the response. Plain text content must be UTF-8 encoded.
For Microsoft Word documents (.doc and .docx extensions), the header value X-Attr-OCR=msword can be used to bypass OCR and instead read the characters and layout directly from the original file.
Files are deleted from the system after 7 days by default, configurable to a maximum of 14 days. Your file's expiration date can be found in the response of this API call
Request
- Base URLhttps://us.app.zuva.ai/api/v2
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
The type of OCR operation to perform on the file
Indicates whether to generate page images for MS Word documents when performing OCR
Request body application/octet-stream
Response
The file was uploaded successfully
Example response
{
"attributes": {
"content-type": "application/pdf",
"sha-256": "8b9bff906445adb9925abca7c48954155b3bfc9b548163086f001fa6b25760aa"
},
"expiration": "2021-10-07T12:07:57Z",
"file_id": "c5e407f1qk1er7odm6tg",
"permissions": [
""
],
"size": 23849850
}Changes
- breaking
removed the media type
plain/textfrom the request body - info
added the new optional
headerrequest parameterX-Attr-MSWord-GenerateImages - info
added the new optional
headerrequest parameterX-Attr-OCR - info
added the media type
application/mswordto the request body - info
added the media type
application/vnd.openxmlformats-officedocument.wordprocessingml.documentto the request body - info
added the media type
text/plainto the request body
- breaking