v1

latestOpenAPI 3.1.02026-07-173384141.4 KB
datasets

post/documents/v2/datasets/{dataset_id}/parse

Path parameters

dataset_idstring required

The ID of the dataset to 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.

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").

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'
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",
  "page_range": "1",
  "labels": {
    "priority": "high",
    "source": "email"
  }
}

Response

Dataset file parsed successfully

parse_idstring required

The unique identifier for the parse job.

Use this identifier to track the progress and results of the parse job using the /documents/v2/parse/{parse_id} endpoint.

This identifier is used to track the parse job's progress and results.

created_atstring required

The date and time when the parse job was scheduled.

The date is in RFC 3339 format (e.g., "2023-10-01T12:00:00Z").

Example response

{
  "parse_id": "parse_id-12345",
  "created_at": "2023-10-01T12:00:00Z"
}