Detect wall materials
Wall material detection · model room-detector
/v1/drawings/detection/wall-materialsDetect rooms, derive wall segments, and resolve partition materials in a single async job. Runs room detection, detects wall segments, and matches each wall to a material with a confidence score — returning geometry, pattern_id, and material per wall in a slimmed-down result you poll for. Detections are in PDF coordinate space.
- Returns
- A job to check202 Accepted
- Usage
- Element detectionper sheet
- Results in
- A list of wallsresult.walls
- Auth
- API keyX-API-Key header
How it runs
- Send a
document_id - Get a
job_id - Check your results or receive a webhook
Request
document_id. Upload your PDF first.Body is JSON — this endpoint does not accept file uploads directly.
| Field | Description |
|---|---|
document_idstring · UUIDRequired | ID of the uploaded PDF. Must belong to this account and not be expired. |
page_numbersarray of integersOptional | 1-based page indices to run room detection on. Omit to scan all pages. Out-of-range values are skipped by the worker but still counted. |
floor_plan_pagesarray of integersOptional | Subset of pages to derive walls on. Useful when you want rooms detected across the full set but walls derived only for a specific floor plan page. Defaults to page_numbers when omitted. |
webhook_urlstring · URLOptional | URL to POST the completed job payload to. Delivered on developer, pro, and enterprise tiers only. |
| Header | Description |
|---|---|
X-API-KeyRequired | Your API key. A missing or invalid key returns 401. |
Content-TypeRequired | application/json |
page_numbers (or every page of the document when omitted) is one element detection, not only the pages that contain rooms or walls. Send only valid page indices.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 and model is room-detector with derive_walls: true, the result field on the job contains:
| Field | Description |
|---|---|
document_idstring | UUID of the source document. |
wallsarray | Slimmed wall detections, one per derived wall segment. |
walls[].idstring | Stable wall identifier. |
walls[].room_idstring | ID of the room this wall segment belongs to. |
walls[].pageinteger | 1-based PDF page index where the wall was detected. |
walls[].lineobject | Wall segment endpoints in PDF coordinate space: x1, y1, x2, y2. |
walls[].pattern_idstring | null | Hatch cluster identifier. null when the wall was too short to sample. |
walls[].materialstring | Resolved partition material (e.g. "1 HR FIRE BARRIER"). Present only when resolved. |
walls[].match_confidencenumber | Confidence score for the material match. Present only when material is present — omitted otherwise, not null. |
geom_source, outward_normal, source, hough_sampled_subsegments, fallback_sampled_subsegments, pattern_segments, room-level diagnostics) are not exposed here. If you need the fuller diagnostic shape, use GET /detection/rooms/{room_job_id}/walls.Usage & rate limits
Each page submitted is one element detection, counted at job submission (See pricing). Rate limit: tier RPM (5 / 60 / 120 / 300).
| 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. |
Rate-limit 429s include retry_after_seconds in the body. Quota 429s and rate-limit 429s return the same status code — check the error body to distinguish them.
Errors
| Status | What it means |
|---|---|
| 401 | Missing or invalid X-API-Key. |
| 402 | Trial allowance used up. |
| 404 | document_id not found or expired. |
| 422 | Validation error — malformed UUID or invalid body. |
| 429 | Rate limit or monthly quota exceeded. |