Detect rooms

Room detection · model room-detector

POST/v1/drawings/detection/rooms

Detects rooms in an architectural floor plan PDF. This is an async job — it returns immediately with a job ID and you poll for the detections. Returns bounding boxes, polygons, and, when available, the room number and label extracted from nearby plan text. Detections are in PDF coordinate space.

Returns
A job to check202 Accepted
Usage
Element detectionper sheet
Results in
A list of roomsresult.rooms
Auth
API keyX-API-Key header

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.

Auth via X-API-Key header (or a bearer token). Body is JSON — this endpoint does not accept file uploads directly.

FieldDescription
document_idstring · UUIDRequiredUUID of a document uploaded via POST /v1/documents. Must belong to this account and not be expired.
page_numbersarray of integersOptional1-based page numbers to scan. Omit to scan the whole document.
webhook_urlstring · URLOptionalURL to notify when the job finishes.
confidence_minnumberOptionalMinimum detection confidence, from 0 to 1. Defaults to 0.3.
apply_ocrbooleanOptionalRead room labels from the drawing text to name rooms and recover rooms the model missed.

Any other field is rejected with 422 VALIDATION_ERROR (Unknown field.).

Responses

The job is enqueued immediately. Poll GET /v1/jobs/{job_id} until status is complete or failed.

FieldDescription
job_idstring · UUIDUse this to poll for results.
statusstringAlways queued on this response.
poll_urlstringPath only — prepend https://api.anchorgrid.ai to build the full URL.

Errors

StatusWhat it means
401Missing or invalid X-API-Key.
404document_id not found or expired.
422Validation error — malformed UUID or invalid body.
503Task queue unavailable — retry.

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.