This feature is currently in beta. The API may change.
jats and wcag processors through POST /api/v1/agent.
These are fixed document tasks; you do not need to design a processor.
Before you begin, make sure you have:
- A Datalab account with an API key
- Python 3.11+ installed
- The Datalab SDK:
pip install datalab-python-sdk - Your
DATALAB_API_KEYenvironment variable set
Choose a Processor
Use page-based documents such as PDFs and scans. Spreadsheets cannot run these
two processors. Both return a
verdict and verifier_metrics in addition to any
available artifact.
For the jats processor, each entry in verifier_metrics has these fields:
Run and Review
max_polls and
poll_interval for your documents; they limit client polling, not the server’s
processing time. To be notified when a run finishes, also set webhook_url in
AgentOptions. The SDK call still polls until the result is ready or
max_polls runs out.
If polling times out, continue polling the existing request instead of
submitting it again. With SDK 0.13.0 or later, the error has the check URL:
AsyncDatalabClient.run_agent()
accepts the same options with await. For wcag, change processor to wcag
and read accessible_pdf instead of jats_xml.
Versions and Run Options
Useprocessor="[email protected]" or processor="[email protected]" to pin the seeded version.
Omitting the version selects the newest published version.
The processor chooses XML or PDF output. mode="fast" or mode="balanced"
controls the run budget; it is separate from verification_effort, which can
be fast, balanced or accurate. The default effort is fast, so set it
explicitly when comparing results.
For a regional request, use file_url or an uploaded file reference with
processing_location. Regional completion can return a signed result_url
for the result JSON; current SDKs download it automatically.
Next Steps
Published Processors
Learn the shared run options and version addressing.
Document Conversion
Use Convert when you need Markdown, HTML, JSON or chunks.
Redaction
Remove selected information and review the redaction verdict.
Python SDK
Configure polling, errors and result handling.