Classify drawings
Drawing classification
POST
/v1/drawings/classifyClassifies every page of a drawing set — identifying drawing numbers, titles, drawing types (floor plan, elevation, schedule, etc.), CSI divisions, scope, and floor level. Returns a structured index grouped by drawing type. This is an async job — submit and poll.
- Returns
- A job to check202 Accepted
- Usage
- Document indexingper page read
- Results in
- A sheet indexresult.pages · result.by_drawing_type
- Auth
- Bearer tokenAuthorization header
How it runs
- Send a
document_id - Get a
job_id - Check your results or receive a webhook
Request
This endpoint requires a
document_id. Upload your PDF first.Auth via Authorization: Bearer <api_key> header. Body is JSON.
| Field | Description |
|---|---|
document_idstring · UUIDRequired | ID from POST /v1/documents. Must belong to this account and not be expired. |
page_numbersarray of integersOptional | 1-based page list. Omit to classify all pages. |
webhook_urlstring · URLOptional | URL to POST the completed job payload to. Delivered on developer, pro, and enterprise tiers only. |
| Header | Description |
|---|---|
AuthorizationRequired | Bearer <api_key> |
Content-TypeRequired | application/json |
UsageClassification counts as document indexing on each page it reads (See pricing). Usage is recorded when the job is submitted.
Responses
The job is enqueued immediately. Poll GET /v1/jobs/{job_id} until status is complete or failed.
| Field | Description |
|---|---|
job_idstring · UUID | Use this to poll for results. |
statusstring | Always queued on this response. |
poll_urlstring | Path only — prepend https://api.anchorgrid.ai to build the full URL. |
When status is complete, the result field on the job contains:
| Field | Description |
|---|---|
pages_analyzedinteger | Total pages processed. |
model_versionstring | e.g. page-classifier-v2.0.0 |
processing_time_msinteger | Wall time for the classification task. |
by_drawing_typeobject | Page numbers grouped by drawing type — the fastest way to find all floor plans, schedules, etc. without iterating the full pages array. |
pages[].page_numberinteger | 1-based page index. |
pages[].drawing_numberstring | Sheet number as printed (e.g. A-101, E-201). |
pages[].titlestring | Drawing title as printed on the sheet. |
pages[].document_typestring | Discipline — ARCHITECTURAL, ELECTRICAL, MECHANICAL, etc. |
pages[].drawing_typestring | Sheet category — FLOOR_PLAN, ELEVATION, SCHEDULE, SECTION, DETAIL, GENERAL, etc. |
pages[].divisionobject | CSI MasterFormat division with code and name fields. |
pages[].scopestring[] | Key elements visible on the page. |
pages[].floorstring | Floor or level reference (Level 1, Roof, etc.) — empty string if not applicable. |
pages[].descriptionstring | Plain-English summary of the page content. |
Use
by_drawing_type to quickly locate all sheets of a given type. Iterate pages only when you need per-page metadata like drawing numbers, titles, or CSI divisions.Usage & rate limits
Document indexing, per page read (See pricing). Typical time: ~2–3 min per 130 pages.
| Plan | When the allowance is used up |
|---|---|
trial | Trial allowance — 402 FREE_TIER_LIMIT_REACHED when used up, 402 TRIAL_ENDED once the trial is over. |
developer | Monthly allowance, then overage up to your overage limit — 402 OVERAGE_LIMIT_REACHED at the limit (429 QUOTA_EXCEEDED when the allowance is used up without overage billing). |
enterprise | No allowance check. |
Errors
| Status | What it means |
|---|---|
| 404DOCUMENT_NOT_FOUND | document_id doesn’t exist or has expired. |
| 402FREE_TIER_LIMIT_REACHED | Trial allowance used up — upgrade required. |
| 402TRIAL_ENDED | The trial has ended — upgrade or ask us to extend it. |
| 402OVERAGE_LIMIT_REACHED | The job would pass your overage limit for this billing period. |
| 429QUOTA_EXCEEDED | Monthly allowance used up (no overage billing). |