Read a spec’s table of contents

Spec TOC parsing · model toc-parser

POST/v1/specs/parse/document

Queue 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 from the document.

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. See pricing for how jobs are counted (402 when a trial allowance is used up, 429 when a monthly allowance is). Optional webhook_url: delivery from the worker requires tier developer, pro, or enterprise.

Returns
A job to check202 Accepted
Usage
Document indexingper page read (up to 40)
Results in
Divisions and sectionsresult.divisions
Auth
API keyX-API-Key header
Some schema docstrings still reference POST /v1/specs/parse; that path does not exist. Use /v1/specs/parse/document (required for content-extract).

How it runs

  1. Send a document_id
  2. Get a job_id
  3. Check your results or receive a webhook

Request

This endpoint requires a document_id. Upload your PDF first.

Body type: ParseSpecByDocumentRequest.

FieldDescription
document_idstring · UUIDRequiredDocument in ag_documents for your account; must not be missing, wrong account, or expired.
webhook_urlstring · URLOptionalHonored on developer, pro, enterprise for worker delivery.

Responses

Shape: ParseJobQueued. Poll until status is complete or failed.

FieldDescription
job_idstring · UUIDUse this to poll for results.
statusstringqueued on this response.
estimated_processing_secondsintegerHint only (e.g. 15).
poll_urlstringPath only — prepend https://api.anchorgrid.ai to build the full URL.

Usage & rate limits

Each job counts as one document-indexing page (See pricing). Rate limit: tier RPM (job-submit bucket).

Errors

Handler detail; Intelligence may still genericize JSON.

StatusWhat it means
401Invalid or missing API key.
422Bad JSON / invalid document_id.
404Document missing, wrong account, or expired (DOCUMENT_NOT_FOUND).
402 / 429Plan allowance used up.
429RPM limit (middleware).

Worker failures → job failed with an error object (code such as URL_UNREACHABLE, PDF_CORRUPT or INTERNAL_ERROR, and a message) — 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.

Searches these docs: guides, the basics and every endpoint.

Make your first requestPlayground walkthrough: upload, choose an analysis, run it
Connect your softwareYour application calls the REST API. Requires an API key
Connect your AI agentGive an agent a tool that calls the REST API
AuthenticationX-API-Key header, 401 errors, keeping keys safe
Detect doorsPOST /v1/drawings/detection/doorsDoor detection — Find the doors on the pages of an architectural drawing set.
Check your resultsGET /v1/jobs/{job_id}Get a job — See a job’s status and, once it’s complete, its results.