Skip to main content
You can integrate Tensorlake Document Ingestion with your existing workflows by using the HTTP APIs.
1

Call the parse endpoint

The parse endpoint will create a parse job with the following request payload:
  • A file source, which can be:
  • Options for parsing. See the parse settings below.
  • page_range: The range of pages to parse, ex: 1-2 or 1,3,5. By default, all pages will be parsed.
  • labels: Metadata to identify the parse request. The labels are returned along with the parse response.
The endpoint will return:
  • parse_id: The unique ID Tensorlake uses to reference the specific parsing job. This ID can be used to get the output when the parsing job is completed and re-visit previously used settings.
2

Query the status of the parsing job

The /parse/{parse_id} endpoint will return:
  • status: The status of the parsing job. This can be failure, pending, processing, or successful.
  • If the parsing job is pending or processing, you should wait a few seconds and then check again by re-calling the endpoint.
3

Retrieve the parsed result

When the parsing job is successful, you can retrieve the parsed result by calling the /parse/{parse_id} endpoint. The response payload will include an Response object:
  • chunks: An array of objects that contain a chunk number (specified by the chunk strategy) and the markdown content for that chunk.
  • pages: A JSON representation of each page’s visual structure, including page dimensions, bounding boxes for each element (text, tables, figures, signatures), and the reading order.
  • labels: Labels associated with the parse job.
The complete upload, parse, and get results flow The APIs to support this workflow are:

Webhooks

You can also use the Webhooks API to receive notifications when a parse job is completed. This is an alternative to polling for parse responses.