/v1/specs/parse/documentQueue TOC / spec structure extraction from a PDF already in ag_documents — the same upload as POST /v1/documents, not a second upload. Job model is toc-parser. Worker reads up to 40 pages of text and parses TOC lines in toc_parser/task.py.
X-API-Key and Content-Type: application/json. Async: immediate 202 with a new job id, then poll GET /v1/jobs/{job_id}. This path is in the tier RPM limiter with other job-submit POSTs. Credits: CreditCost.SPEC — 1 credit per parse job (free lifetime 402, paid monthly exhaustion 429). Optional webhook_url: delivery from the worker requires tier developer, pro, or enterprise.
Some schema docstrings still reference POST /v1/specs/parse; that path does not exist. Use /v1/specs/parse/document (required for content-extract).
Request
Body type: ParseSpecByDocumentRequest.
Code examples
Response — 202 Accepted
Shape: ParseJobQueued. Poll until status is complete or failed.
Result shape
When status === "complete" and model === "toc-parser". Division/section shape comes from TOCParser.parse_toc_structure (division_code, division_title, sections[] with section_code as 6 digits and section_title). GET /v1/jobs does not post-filter toc-parser results.
Credits & rate limits
Errors
Handler detail; Intelligence may still genericize JSON.
Worker failures → job failed with error_code such as URL_UNREACHABLE, PDF_CORRUPT, INTERNAL_ERROR — poll GET /v1/jobs.
See Errors for HTTP exception mapping.
Typical flow
Continue with POST /v1/specs/content-extract using the completed TOC job_id and section or division codes.
Response Preview
{ "job_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7", "status": "queued", "estimated_processing_seconds": 15, "poll_url": "/v1/jobs/7c9e6679-7425-40de-944b-e07fc1f90ae7" }