v1

latestOpenAPI 3.1.02026-07-173384141.4 KB
parse

post/documents/v2/parse

Request body

file_idstring nullable

ID of the file previously uploaded to Tensorlake.

This is the ID of the file in Tensorlake's storage system. It has a tensorlake- (for V1 files), or file_ (for V2 files) prefix.

This field must be provided if file_url and raw_text are not provided.

file_urlstring nullable

External URL of the file to parse.

This URL should point to a publicly accessible file that can be downloaded.

This field must be provided if file_id and raw_text are not provided.

raw_textstring nullable

The raw text to parse.

This should be a free-text representation of the document.

This field must be provided if file_id and file_url are not provided.

mime_type'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'
page_rangestring nullable

The range of pages to parse in the document. Default - All pages will be parsed.

This should be a comma-separated list of page numbers or ranges (e.g., "1,2,3-5").

labelsobject nullable

Additional metadata to identify the parse request. The labels are returned in the parse response.

Example request

{
  "file_url": "https://pub-226479de18b2493f96b64c6674705dd8.r2.dev/real-estate-purchase-all-signed.pdf",
  "labels": {
    "priority": "high",
    "source": "email"
  }
}

Response

Created parse job details

parse_idstring required

The unique identifier for the parse job

This is the ID that can be used to track the status of the parse job. Used in the GET /documents/v2/parse/{parse_id} endpoint to retrieve the status and results of the parse job.

created_atstring required

The creation date and time of the parse job.

The date is in RFC 3339 format.