standard tier, then waiting for the results. standard jobs consume half the credits of a synchronous Parse request, with a slower turnaround, so they suit bulk work where no one waits on each document. See Credit Consumption.
For each document, the script saves two files to an output folder, named after the file name and its extension so that invoice.pdf and invoice.png don’t overwrite each other:
<name>_<extension>.md, such asinvoice_pdf.md: the document as Markdown, ready to send to Extract.<name>_<extension>_parse_output.json, such asinvoice_pdf_parse_output.json: the full parse response, including thestructuretree with the page number and bounding box of every block. Keep it if you plan to ground extracted fields later.
standard jobs count against your plan’s hourly page limit. See Rate Limits.
These examples require the Python or TypeScript client library. Before running a script, set your API key and install the library and any required dependencies.
Scripts
Collect Jobs That Are Still Running
The wait timeout only stops the script from waiting. The job keeps running on the server, so collect a job the script reports as still running withclient.v2.parse_jobs.get() (Python) or client.v2.parseJobs.get() (TypeScript) and its job_id. See Monitor a Parse Job.
When Someone Is Waiting on the Results
Setservice_tier to priority in the create call. priority jobs consume credits at the full rate and draw from the same per-minute limit as synchronous requests. See Choose a Service Tier.