Detect doors
Door detection · model door-detector
/v1/drawings/detection/doorsFind door leaves and paired door openings. This compatibility endpoint uses appliance detection with Door and DoubleDoor fixed. For selectable types, use appliance detection.
Accepts a previously uploaded document_id, enqueues inference, and returns a job you poll for results. Detections are returned as bounding boxes in PDF coordinate space.
- Returns
- A job to check202 Accepted
- Usage
- Element detectionper sheet
- Results in
- Door annotationsresult.doors
- Auth
- API keyX-API-Key header
Free-tier doors detection typically completes in 2–4 minutes per job. Processing time scales mainly with page count and drawing complexity — a dense multi-page set takes longer than a single sheet.
Review Developer and Enterprise plans for higher usage limits. Upgrade your plan
Example


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 or image. Must belong to this account and not be expired. |
page_numbersarray of integersOptional | 1-based page indices to scan, for example [1, 2, 3]. Omit to scan all pages. Out-of-range values are skipped by the worker but still counted. |
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 selected objects. 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 door-detector, the result field on the job contains:
| Field | Description |
|---|---|
document_idstring | UUID of the source document. |
doorsarray | Door leaves and double-door openings. Each item has id, page, category_id, category_name, and bbox. |
doors[].idstring | Stable identifier — "door_" + 12 hex chars. |
doors[].pageinteger | 1-based page index where the object was detected. |
doors[].category_idinteger | Stable IDs: Door = 1, DoubleDoor = 2. |
doors[].category_namestring | Door or DoubleDoor. |
doors[].bboxobject | Axis-aligned bounding box in PDF coordinate space: x1, y1, x2, y2. |
doors_foundinteger | Total number of returned door annotations, including double-door enclosing boxes. |
pages_analyzedinteger | Number of pages the worker actually scanned. |
model_versionstring | e.g. door-detector-fused-v3.1.0 |
processing_time_msinteger | Wall time for the inference task. |
Door returns one box per leaf, including the leaves of paired doors. DoubleDoor returns an enclosing box for the paired opening. When both are selected, a double door has two leaf boxes plus one pair box. This route always returns both classes and accepts the original document/page/webhook request. To select classes or detect toilets and urinals, use appliance detection. There is no confidence score.Usage & rate limits
Each page scanned is one element detection (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. |