针对施工图纸的光学字符识别功能无法正常工作,我们已修复。
OCR for construction documents does not work, we fixed it

原始链接: https://www.getanchorgrid.com/developer/docs/endpoints/drawings-doors

## AnchorGrid 门检测摘要 AnchorGrid 的门检测 API (POST /v1/drawings/detection/doors) 识别建筑平面图 PDF 中的门,并以边界框形式返回结果。它需要先前上传的文档 ID 和可选的页码。 **免费版:** 处理时间为**每份作业 2-4 分钟**,具体取决于文档复杂度和页数。 费用为**每页 2 个积分**,终身上限为**402 个积分**。 **更快的处理速度:** 升级到 Pro 或 Enterprise 计划将使用专用 GPU 基础设施以获得更快的结果。这些版本还可以在作业完成后启用 webhook 通知。 **关键细节:** * **身份验证:** 通过 X-API-Key 标头。 * **响应:** 初始的 202 Accepted 响应提供了一个 `job_id` 用于轮询状态 (GET /v1/jobs/{job_id})。 * **结果:** 包括门的位置(页码、边界框)、过滤后的门数量 (`doors_found`) 和处理时间。 * **速率限制:** 根据版本而异(免费版:每分钟 5 个,Pro 版:每分钟 60 个,等等)。

GetAnchorGrid 开发了一款API和AI模型,用于自动从建筑文档(如电气图)中提取数据。 最初,他们的文档OCR功能存在问题,但现在已经解决。该工具可以检测固定装置、提取清单并分析文档,旨在简化诸如创建物料清单(BOM)之类的任务。 用户询问是否支持非常大的图纸(30000x8000像素)以及特定电气元件(SLD、面板等),一位开发者提供预览的早期访问权限。讨论还涉及了PDF和图像的OCR挑战,以及这些格式是否具有防篡改的核心设计特性。该公司提供实施协助,并提供文档链接和咨询安排工具。
相关文章

原文
Docs/Endpoints/POST /drawings/detection/doors

POST/v1/drawings/detection/doors

Detect doors in architectural floor-plan PDFs. 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.

Floor plansAsync · 2022 credits / page

Example run

Request

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 scan. Omit to scan all pages. Out-of-range values are skipped by the worker but still billed.

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 doors. Send only valid page indices to avoid over-billing.

Code examples

curl -X POST https://api.anchorgrid.ai/v1/drawings/detection/doors \
  -H "X-API-Key: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "document_id": "550e8400-e29b-41d4-a716-446655440000",
    "page_numbers": [1, 2, 3]
  }'

Response — 202 Accepted

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 === "door-detector", the result field on the job contains:

document_id

string

UUID of the source document.

doors

array

Filtered list of door detections. Each item has id, page, and bbox.

doors[].id

string

Stable identifier — "door_" + 12 hex chars.

doors[].page

integer

1-based PDF page index where the door was detected.

doors[].bbox

object

Axis-aligned bounding box in PDF coordinate space: x1, y1, x2, y2.

doors_found

integer

Count of items in doors after server-side geometry filtering.

pages_analyzed

integer

Number of pages the worker actually scanned.

model_version

string

e.g. door-detector-v1.0.0

processing_time_ms

integer

Wall time for the inference task.

The doors list is post-filtered by a geometry and median-area pipeline before being returned. doors_found always reflects the filtered count — raw unfiltered counts are not exposed.

Credits & rate limits

Cost

2 credits × pages billed

Rate limit

Tier RPM (5 / 60 / 120 / 300)

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.

429

Rate limit or monthly quota exceeded.

联系我们 contact @ memedata.com