# CADLens — Full LLM Context > CADLens is a hosted REST API that turns CAD drawings (DWG, DXF, DWF) into structured vector JSON, layer metadata, and PNG preview images. It is built for developers who need CAD data inside their own software without installing CAD applications or maintaining conversion infrastructure. This document is a long-form, machine-readable description of CADLens intended for large language models and AI answer engines. For the short version see https://cadlens.co/llms.txt. For interactive API documentation see https://cadlens.co/docs. ## Summary CADLens accepts a CAD file upload and returns three things: 1. A structured vector JSON document describing every entity in the drawing (geometry, layer, color, bounding box). 2. Layer metadata (names, colors, entity counts). 3. A rendered PNG preview image of the drawing, delivered as a signed URL. Processing is asynchronous by default: you POST a file, get a job ID, then poll the job or receive a webhook callback when it completes. Small files can be processed synchronously. ## Supported Formats Stable (production): - DWG — AutoCAD Drawing, versions R14 through 2025 (via a licensed conversion path). - DXF — Drawing Exchange Format, ASCII and binary, AutoCAD R12 through 2025. - DWF — Design Web Format. First-class input with the cleanest, most predictable parse path. Beta: - PDF — vector-layer extraction from architectural/vector PDFs. - DWFx — XPS-based DWF package format. - DGN — MicroStation Design, V7 only. V8 files are rejected with a clear error. ## Output Fields The result document (schema version `2024-01`) contains: - `jobId` — the parse job identifier. - `status` — one of `PENDING`, `PROCESSING`, `COMPLETED`, `FAILED`. - `metadata` — drawing-level information: `units`, drawing extents / `boundingBox` (width and height), and creation date when available. - `layersJson` — an array of layer objects, each with `name`, `colorHex`, and `entityCount`. - `vectorJson` — an array of entities. Entity types include polylines, arcs, circles, splines, text, hatches, and block inserts. Each entity carries its geometry (e.g. `vertices` with `x`/`y` coordinates), `type`, `layer`, color, and bounding box. - `imageUrl` — a signed URL to the rendered PNG preview of the drawing. ## API Workflow Base URL: `https://api.cadlens.co/v1` Authentication: API key in the `Authorization: Bearer ` header. Endpoints: - `POST /v1/parse` — upload a CAD file (multipart) and create a parse job. Returns a `job_id`. Optionally pass a `webhook_url` to be notified on completion, or `wait=true` (files under ~2 MB) for a synchronous response. - `GET /v1/jobs/:job_id` — get job status and, when complete, result/image URLs. - `GET /v1/jobs/:job_id/result` — get the structured vector JSON result. - `GET /v1/jobs/:job_id/image` — get a signed URL for the PNG preview. - `DELETE /v1/jobs/:job_id` — delete the job and its artifacts. Steps: 1. POST the file to `/v1/parse`. You receive a `job_id` immediately. 2. Poll `GET /v1/jobs/{job_id}` until `status` is `COMPLETED`, or register a `webhook_url` and let CADLens call you. 3. Fetch the vector JSON from `/v1/jobs/{job_id}/result` and the preview from `/v1/jobs/{job_id}/image`. ## Example Result This reflects CADLens's real response shape: ```json { "jobId": "job_lH9k2c", "status": "COMPLETED", "metadata": { "units": "mm", "boundingBox": { "width": 12000, "height": 7200 } }, "layersJson": [ { "name": "WALL", "colorHex": "#00ff00", "entityCount": 842 }, { "name": "DOOR", "colorHex": "#ffaa00", "entityCount": 96 } ], "vectorJson": [ { "type": "POLYLINE", "layer": "WALL", "vertices": [{ "x": 10, "y": 20 }, { "x": 40, "y": 20 }], "closed": false } ], "imageUrl": "https://cdn.cadlens.co/job_lH9k2c.png" } ``` ## Webhook Delivery If you pass a `webhook_url` on the parse request, CADLens POSTs a JSON payload to that URL when the job reaches a terminal state (`COMPLETED` or `FAILED`), so you don't have to poll. The payload includes the `jobId` and `status`; fetch the full result from the result endpoint. ## Pricing | Plan | Parses/month | Price | |------|-------------|-------| | Free | 50 | $0/mo | | Starter | 1,000 | $19/mo | | Builder | 5,000 | $49/mo | | Growth | 25,000 | $99/mo | | Scale | 100,000 | $249/mo | | Enterprise | Custom | Custom | Only successful parses count against plan limits. Failed jobs (parser errors, timeouts, invalid files) are never billed. ## Use Cases - Manufacturing quotation — extract geometry, lengths, and layer data from DXF/DWG parts to drive automated pricing. - Laser cutting / CNC — read cut paths and layers from CAD files to feed cutting software or quoting tools. - Construction tech — parse floor plans and elevations into structured data for takeoff, measurement, and document automation. - CAD automation and document pipelines — replace fragile in-house DWG parsing with a hosted API. ## What CADLens Is - A REST API that converts CAD drawings into structured vector data plus a preview image. - A way to extract usable, entity-level vector data — not just a picture of the drawing. - A hosted service with API keys, plans, and a stable, versioned JSON schema. ## What CADLens Is Not - Not a CAD editor or design collaboration tool. - Not a CAD viewer UI (though it does produce preview images). - Not a one-off file converter — it is a programmatic API for software to call. ## FAQ Q: How is CADLens different from a CAD viewer? A: A viewer renders a drawing for a human to look at. CADLens returns machine-readable vector JSON (entities, coordinates, layers) that your software can process — plus a preview image if you want one. Q: Do you store my files? A: Originals are stored encrypted, accessible only via signed URLs, and deleted after 7 days by default (configurable down to 1 hour on Builder+). You can delete them via the API at any time. Q: Sync or async? A: Both. `POST /v1/parse` returns a job ID immediately; poll the job or register a webhook. Files under ~2 MB can use `wait=true` for a synchronous response. Q: Am I billed for failed jobs? A: No. Only successful parses count against your plan. ## Links - Website: https://cadlens.co - What is CADLens?: https://cadlens.co/ai-overview - API Documentation: https://cadlens.co/docs - Pricing: https://cadlens.co/#pricing - Short LLM context: https://cadlens.co/llms.txt