# CADLens > CAD file parsing API — upload DWG, DXF, or DWF files and get structured vector JSON, layer metadata, and PNG previews. ## Overview CADLens is a hosted REST API for parsing CAD files. Developers send a CAD file and receive machine-readable output without installing any CAD software or managing conversion infrastructure. Supported input formats: DWG, DXF, DWF (stable). PDF (vector), DWFx, and DGN V7 are in beta. ## API Endpoints Base URL: `https://api.cadlens.co/v1` Authentication: API key via `Authorization: Bearer ` header. | Method | Path | Description | |--------|------|-------------| | POST | /v1/parse | Upload a CAD file and create a parse job | | GET | /v1/jobs/:job_id | Get job status (PENDING, PROCESSING, COMPLETED, FAILED) | | GET | /v1/jobs/:job_id/result | Get structured vector JSON result | | GET | /v1/jobs/:job_id/image | Get signed URL for PNG preview | | DELETE | /v1/jobs/:job_id | Delete job and associated artifacts | ## Workflow 1. POST a CAD file to `/v1/parse` — returns a `job_id` 2. Poll `GET /v1/jobs/{job_id}` or register a webhook URL to be notified on completion 3. Retrieve results: vector JSON from `/v1/jobs/{job_id}/result`, PNG preview from `/v1/jobs/{job_id}/image` For files under ~2 MB, pass `wait=true` on the parse request to get a synchronous response. ## Response Schema The vector JSON result (schema version `2024-01`) includes: - **File metadata**: units, layers list, drawing extents (bounding box), creation date - **Entities array**: polylines, arcs, circles, splines, text, hatches, block inserts — each with coordinates, layer name, color, and bounding box - **Layer metadata**: layer names, colors, line types, visibility flags - **PNG preview**: rendered image of the drawing accessible via signed URL ## 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 | Failed jobs (parser errors, timeouts, invalid files) are never billed. Only successful parses count against plan limits. ## Key Pages - What is CADLens? — https://cadlens.co/ai-overview - DWG to JSON API — https://cadlens.co/dwg-to-json-api - DXF to JSON API — https://cadlens.co/dxf-to-json-api - DWF to JSON API — https://cadlens.co/dwf-to-json-api - CAD file preview API — https://cadlens.co/cad-file-preview-api - CAD viewer vs CAD parser — https://cadlens.co/cad-viewer-vs-cad-parser - DWG to image vs DWG to JSON — https://cadlens.co/dwg-to-image-vs-dwg-to-json ## Links - Website: https://cadlens.co - API Documentation: https://cadlens.co/docs - Pricing: https://cadlens.co/#pricing - Full LLM context: https://cadlens.co/llms-full.txt