Endpoints
Classify Document
Upload a PDF and receive document classification, extracted metadata, and a partial /check request body when supported
POST
/check endpoint when the PDF is a supported federal filing. The API extracts page count, word count, structural metadata, and document type from the PDF automatically. You must add filing context fields (is_pro_se, pmc_completed, opposing_party_pro_se, filing_role) before sending to /check.
The response includes a supported boolean indicating whether the document is a classifiable federal court filing. Non-federal documents, blank templates, court rules or practices, and non-legal documents return supported: false with confidence: "low" and no check_request.
Uploaded PDFs are stored server-side for quality improvement.
Note: May take 10-30 seconds to respond. Format extraction (font, margins, line spacing) has a 15-second timeout; fillable forms and interactive PDFs may hit this limit, in which case format checks are skipped and a warning is returned.
Try it
A sample filing PDF is available in the console playground. Upload it to see classification, extracted metadata, and a ready-to-run/check request body.
Request
string
required
Judge slug identifier (e.g.
gary-r-brown)string
required
District identifier (e.g.
edny)string
required
Base64-encoded PDF file.
string
Original filename of the PDF (e.g.
motion_for_summary_judgment.pdf). Recommended: always include
if available. Filenames like memo_in_support_sj.pdf provide a strong classification signal;
generic names like document.pdf are still accepted but add no value.Response fields
object
Document type classification
object
Extracted document metadata including page count, word count, and structural elements detected in
the PDF (caption, sections, format, privacy).
object
Present only when
supported is true. A partial request body for POST /api/v1/check. Includes judge_slug, district_id, document_scope,
motion_type (if detected), and the full document object. You must add is_pro_se,
pmc_completed, opposing_party_pro_se, and filing_role before sending.object
Breakdown of how body page count was computed from total PDF pages.
object
Detected font, margin, and line spacing from the PDF. Used for formatting compliance checks.
string[]
Conditions that may affect result quality. Present only when something noteworthy occurred during
analysis (e.g., format extraction failed, document was truncated).
Error responses
Usage pattern
The typical supported-document flow is classify, then check:check_request field contains everything the classifier can extract from the PDF. Before sending it to /check, add the filing context fields that only the filer knows: is_pro_se, pmc_completed, opposing_party_pro_se, and filing_role. When supported is false, show the classification reasoning to the user and do not call /check.