Extract spec sections

Section content extraction · model content-extractor

POST/v1/specs/content-extract

Queue extraction of section text (and optional LLM-structured requirement fields) for CSI-style sections from the same PDF as a completed TOC parse job. Job model: content-extractor. X-API-Key and Content-Type: application/json; response is 202 with a new job id, then poll GET /v1/jobs/{job_id}.

Returns
A job to check202 Accepted
Usage
Document indexingper page of the sections extracted
Results in
Section contentresult.sections
Auth
API keyX-API-Key header

Prerequisite

Needs a completed TOC jobRequires a toc-parser job for your account with status complete. Create it with POST /v1/specs/parse/document. The canonical path is /v1/specs/parse/document — not /v1/specs/parse.

How it runs

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

Request

Headers: X-API-Key, Content-Type: application/json. Body: ContentExtractRequest.

FieldDescription
job_idstring · UUIDRequiredMust be a completed toc-parser job id for this account.
section_codesstring[]OptionalExplicit 6-digit section codes.
division_codesstring[]OptionalExpands to all 6-digit section codes under each division using result.divisions on the TOC job. Sections are pulled only from divisions present in the stored TOC result.
webhook_urlstring · URLOptionalWorker delivers on developer, pro, and enterprise only.
Section codesNon-digits stripped; first 6 digits must form a full code (e.g. "10 29 00" → 102900). Invalid input → 422 INVALID_SECTION_CODE.
Division codesNon-digits stripped; last 2 digits padded to match division (e.g. 01, 1). Sections are taken only from divisions present in the stored TOC result. After expansion, codes are deduplicated (order preserved). If nothing resolves → 422 NO_SECTIONS_RESOLVED.

Responses

The response job_id is a new content-extractor job. The request body job_id is the source TOC job; when complete, result.source_job_id points back to that TOC job. Poll GET /v1/jobs/{job_id} — see GET /v1/jobs/{job_id}.

FieldDescription
job_idstring · UUIDNew content-extractor job id.
statusstringAlways queued on this response.
poll_urlstringPath only — prepend https://api.anchorgrid.ai.

Usage & rate limits

Each job counts as one document-indexing page. Allowance behavior is the same as parse/document: 402 when a trial allowance is used up, 429 when a monthly allowance is; RPM 429 from middleware. Rate limit: tier RPM (job-submit bucket).

Errors (synchronous, before queueing)

Codes appear in handler detail; Intelligence may still genericize JSON bodies.

StatusWhat it means
401Missing or invalid API key.
402Trial allowance used up.
404JOB_NOT_FOUNDNo row with that id + account + model toc-parser.
422Pydantic validation: missing both section_codes and division_codes, bad UUID, etc.
422JOB_NOT_COMPLETETOC job still queued, processing, or failed.
422JOB_NO_FILETOC job missing input_s3_key / bucket.
422INVALID_SECTION_CODECannot normalize to 6 digits.
422NO_SECTIONS_RESOLVEDExpansion + explicit codes yielded nothing.
429Monthly quota or RPM limit.

See Errors for HTTP exception mapping.

Typical flow

  1. POST /v1/documents → document_id
  2. POST /v1/specs/parse/document → TOC job_id
  3. GET /v1/jobs/{toc_job_id} until complete → read result.divisions / section codes
  4. POST /v1/specs/content-extract with body job_id (TOC job) and section_codes and/or division_codes
  5. GET /v1/jobs/{content_job_id} until complete → read result.sections

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.