Detect 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.
Auth via X-API-Key header. Body is JSON — this endpoint does not accept file uploads directly.
document_idreq
string (UUID)
ID of the uploaded PDF. Must belong to this account and not be expired.
page_numbers
int[]
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 billed.
floor_plan_pages
int[]
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_url
string
URL to POST the completed job payload to. Delivered on developer, pro, and enterprise tiers only.
ℹ
Credits are charged on submission based on len(page_numbers) (or the document's total page count when omitted), not on pages that actually contain rooms or walls. Send only valid page indices to avoid over-billing.
The job is enqueued immediately. Poll GET /v1/jobs/{job_id} until status is complete or failed.
job_id
string (UUID)
Use this to poll for results.
status
string
Always queued on this response.
poll_url
string
Path only — prepend https://api.anchorgrid.ai to build the full URL.
Result shape
When status === "complete" and model === "room-detector" with derive_walls: true, the result field on the job contains:
document_id
string
UUID of the source document.
walls
array
Slimmed wall detections, one per derived wall segment.
walls[].id
string
Stable wall identifier.
walls[].room_id
string
ID of the room this wall segment belongs to.
walls[].page
integer
1-based PDF page index where the wall was detected.
walls[].line
object
Wall segment endpoints in PDF coordinate space: x1, y1, x2, y2.
walls[].pattern_id
string | null
Hatch cluster identifier. null when the wall was too short to sample.
walls[].material
string
Resolved partition material (e.g. "1 HR FIRE BARRIER"). Present only when resolved.
walls[].match_confidence
number
Confidence score for the material match. Present only when material is present — omitted otherwise, not null.
ℹ
This endpoint returns a deliberately minimal wall shape. Internal algorithm fields (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.
Credits & rate limits
Cost
4 credits / page
Rate limit
Tier RPM (5 / 60 / 120 / 300)
Quota is applied at job submission based on submitted page selection.
free
Lifetime credit cap — 402 FREE_TIER_LIMIT_REACHED when exceeded.
developer / pro
Monthly pool — 429 QUOTA_EXCEEDED when exceeded.
enterprise
No quota 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
401
Missing or invalid X-API-Key.
402
Free tier lifetime credit cap reached.
404
document_id not found or expired.
422
Validation error — malformed UUID or invalid body.