v1

latestOpenAPI 3.1.02026-07-173384141.4 KB
parse

post/documents/v1/parse

Request body

filestring nullable

The file to parse.

This can be a remote file URL or a tensorlake file (e.g. file_***).

If a remote file URL is provided, the file will be downloaded and parsed.

For a tensorlake file, the file needs to be uploaded to the server first.

This field is optional and is only used if the content field is not provided.

If both fields are provided, this field takes precedence.

contentstring nullable

The content to parse.

This can be any kind of text e.g. an email content, or an HTML page.

This field is optional and is only used if the file field is not provided.

If both fields are provided, the file field takes precedence.

mimeType'application/pdf' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.openxmlformats-officedocument.presentationml.presentation' | 'application/vnd.apple.keynote' | 'image/jpeg' | 'text/plain' | 'text/html' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'application/vnd.ms-excel.sheet.macroEnabled.12' | 'application/vnd.ms-excel' | 'text/csv' | 'image/png'
pagesstring nullable

The page number to parse.

This is only used if the file field is provided, and is a pageable file (e.g. PDF). If not provided, all pages will be parsed.

labelsobject nullable

Additional metadata for the job.

Response

Parse pages from a file

jobIdstring required
fileIdstring required
statusstring required