Context
Why on earth would this ever happen, you rightfully ask? Let’s see, it’s:- more convenient to attach one file into an email
 - a common workaround when batch scanning papers when archiving content
 - possible some people thrive in chaos
 
Running a Segmentation
This set up is similar to our Marker example from earlier:- Upload your file for processing, along with a few settings (we’ll cover them below)
 - Poll to see if your request is done
 - voila!
 
Making an API Call
Segmentation uses ourmarker endpoint which is available at /api/v1/marker, and will automatically run if you pass in a segmentation_schema parameter.
Let’s say we had a file of 5 pages that is actually composed of two different documents.
Here is an example request in Python:
request_check_url every few seconds.
processing until it’s done (at which point it changes to complete. When it’s done, your response will look something like this:
pages.
You can then use the page_range parameter in Marker to process each segment of the document as you wish.