API Documentation

Integrate drawing verification into your workflow

Introduction

The Drawing AI Check API lets you programmatically upload technical drawings and receive automated compliance checks against ISO, ASME, DIN, and JIS standards.

Base URL/api/v1
  • All responses are JSON
  • File uploads use multipart/form-data
  • Authentication via Bearer token

Authentication

Create API tokens in Settings → API Tokens. Each token comes with a webhook secret for verifying webhook signatures.

Token format

dc_ + 64 hex characters

Header
http
Authorization: Bearer dc_your_token_here

Note: Token management (create, list, revoke) requires a browser session and cannot be done via API token.

Quick Start

Three steps to check a drawing programmatically:

1. Upload a drawing

curl
curl -X POST /api/v1/checks \
  -H "Authorization: Bearer dc_your_token" \
  -F "drawing_file=@drawing.pdf"

2. Poll for status

curl
curl /api/v1/checks/{id} \
  -H "Authorization: Bearer dc_your_token"

# Response: { "id": "abc-123", "status": "COMPLETED", ... }

3. Get the report

curl
curl /api/v1/checks/{id}/result \
  -H "Authorization: Bearer dc_your_token"

Data Extraction

Three steps to extract data from drawings:

Alternative: Sequential Upload (for large files)

curl
# 1. Create empty job
curl -X POST /api/v1/extractions \
  -H "Authorization: Bearer dc_your_token"

# 2. Upload files one at a time
curl -X POST /api/v1/extractions/{id}/files \
  -H "Authorization: Bearer dc_your_token" \
  -F "file=@drawing.pdf"

curl -X POST /api/v1/extractions/{id}/files \
  -H "Authorization: Bearer dc_your_token" \
  -F "file=@model.step"

# 3. Start processing
curl -X POST /api/v1/extractions/{id}/start \
  -H "Authorization: Bearer dc_your_token"

1. Upload files (batch)

curl
curl -X POST /api/v1/extractions \
  -H "Authorization: Bearer dc_your_token" \
  -F "files=@drawing1.pdf" \
  -F "files=@drawing2.pdf"

2. Poll for status

curl
curl /api/v1/extractions/{id} \
  -H "Authorization: Bearer dc_your_token"

# Response: { "id": "...", "status": "COMPLETED", ... }

3. Get the result

curl
curl /api/v1/extractions/{id}/result \
  -H "Authorization: Bearer dc_your_token"

Checks

Upload a drawing for checking

List checks (paginated)

Get job status

Get full report (COMPLETED only)

Get findings with filters

Download annotated PDF

Comparisons

Compare multiple check results to detect deviations across formats (Level 1) or between revisions (Level 2). Comparisons run on top of completed Level 0 check jobs.

Check Levels

  • Level 0 — Basic drawing check (single file) → POST /checks
  • Level 1 — Format comparison (PDF vs DXF vs DWG) → POST /comparisons/submit
  • Level 2 — Version comparison (revision tracking) → POST /comparisons/submit

Workflow

  1. Upload files via POST /checks (one per format/version)
  2. Wait for all L0 checks to complete
  3. Submit comparison via POST /comparisons/submit with the job IDs
  4. Poll comparison status via GET /comparisons/{set_id}
  5. Retrieve report via GET /comparisons/{set_id}/report

Create a comparison and start processing

Create a comparison set without starting it

List comparison sets (paginated)

Get comparison set with members

Update comparison name or authoritative job

Delete comparison set and results

Add a check job to the comparison

Remove a check job from the comparison

Start comparison processing

Get comparison report (COMPLETED only)

Download comparison report as PDF

Data Extraction

Upload files for data extraction

Upload a file to a PENDING extraction job

Start processing a PENDING extraction job

List extraction jobs (paginated)

Get extraction job status

Get full extraction result (COMPLETED only)

Download result as JSON file

List files in extraction job

Download original PDF file

Delete extraction job

Email Submission

Send drawings as email attachments to get automated checks or data extraction — no API integration required.

Drawing Checkscheck@cnc24.ai
Data Extractiondata@cnc24.ai

How It Works

  1. Configure whitelisting — add your domain or sender address in Settings → Email
  2. Send email — attach PDF or DXF files and send to the appropriate address above
  3. Receive acknowledgment — an auto-reply confirms receipt with job IDs (processing takes ~2–5 minutes)
  4. Receive results — a threaded reply with a findings summary and annotated PDF attachment

Supported Attachments

  • PDF and DXF files
  • Max 25 MB per file
  • Max 10 attachments per email
  • Non-drawing attachments are ignored

Subject Line Metadata

The system parses the subject line and filenames to extract:

  • Part number (e.g. PN: ABC-12345)
  • Revision (e.g. Rev A)
  • Standard (e.g. ISO, ASME, DIN)

Additional Features

  • Duplicate detection — identical files resend previous results instantly
  • Bilingual — results in English or German based on account settings
  • Rejection emails — sent if sender is not whitelisted or account has insufficient credits

Note: The endpoints below use browser session authentication, not API tokens. Manage whitelists from Settings or programmatically via these endpoints.

List whitelisted domains, senders, and email addresses

Add a whitelisted domain

Remove a whitelisted domain

Add a whitelisted sender

Remove a whitelisted sender

Webhooks

Instead of polling, provide a webhook_url when creating a check or extraction. We'll POST results to your endpoint when the job completes or fails.

Events

check.completedcheck.failedextraction.completedextraction.failed

Headers

NameTypeDescription
X-DrawingCheck-Signaturestringsha256={hex} — HMAC-SHA256 of the body
X-DrawingCheck-EventstringEvent name (e.g. check.completed, extraction.completed)
X-DrawingCheck-Job-IdstringThe job ID (check or extraction)

Payload Example

json
{
  "event": "check.completed",
  "job_id": "abc-123",
  "status": "COMPLETED",
  "filename": "drawing.pdf",
  "summary": {
    "total_rules": 73,
    "passed": 68,
    "failed": 3,
    "warnings": 2,
    "findings_count": 5
  },
  "result_url": "/api/v1/checks/abc-123/result"
}

Signature Verification

curl
# Verify with openssl
echo -n "$BODY" | openssl dgst -sha256 -hmac "$WEBHOOK_SECRET"
# Compare with the X-DrawingCheck-Signature header value

Retry Policy

  • 3 delivery attempts
  • Exponential backoff: 2s, 4s, 8s
  • 30-second timeout per attempt
  • Your endpoint must return 2xx to acknowledge delivery

Errors & Rate Limits

Error Response Format

json
{ "detail": "Description of the error" }

Status Codes

CodeMeaning
400Bad request — invalid parameters
401Unauthorized — missing or invalid token
402Payment required — insufficient credits
403Forbidden — token lacks permission
404Not found — job does not exist
409Conflict — job not yet completed
413Payload too large — file exceeds size limit
415Unsupported media type
429Too many requests — rate limit exceeded
499Client disconnected during upload

Rate Limits

  • POST /checks: 10 uploads per minute
  • POST /extractions: 10 uploads per minute

File Size Limits

  • PDF: 100 MB
  • DXF / DWG: 200 MB
  • STEP: 500 MB
API Documentation - Drawing AI Check