DXF is an open, documented format — and CADLens parses it natively. Submit an ASCII or binary DXF file (R12 through 2025) and receive a complete machine-readable result: entity geometry, layer metadata, drawing extents, and a PNG preview. No intermediate conversion step, no CAD software on your side.
DXF (Drawing eXchange Format) is publicly documented by Autodesk, which makes it far more approachable than DWG. But reading raw DXF still means parsing a multi-section ASCII or binary file, resolving block inserts, following entity references across sections, handling version differences from R12 to the latest release, and mapping AutoCAD color indices to hex values.
CADLens handles all of that. You upload a DXF file; you get back clean, versioned JSON with no parser code on your side.
DXF is the preferred input format when you control the upstream toolchain and can export from CAD software in a choice of formats. Common scenarios:
Authentication is an API key in the Authorization: Bearer header. The base URL is https://api.cadlens.co/v1.
Step 1 — Upload the DXF file:
POST /v1/parse
Content-Type: multipart/form-data
Authorization: Bearer <api_key>
file=<your-drawing.dxf>
// Response
{ "jobId": "job_02jk..." }For files under roughly 2 MB, append ?wait=true to receive the complete result synchronously. For larger files the job is queued; add a webhook_url field to be notified on completion without polling.
Step 2 — Check status:
GET /v1/jobs/job_02jk...
Authorization: Bearer <api_key>
// Response
{
"jobId": "job_02jk...",
"status": "COMPLETED", // PENDING | PROCESSING | COMPLETED | FAILED
"fileName": "bracket.dxf",
"fileSize": 48200,
"createdAt": "2024-10-14T11:00:00Z",
"completedAt": "2024-10-14T11:00:03Z"
}Step 3 — Retrieve vector data and image:
GET /v1/jobs/job_02jk.../result // vector JSON GET /v1/jobs/job_02jk.../image // signed PNG URL
The result schema is versioned at 2024-01. A typical DXF result for a mechanical part:
{
"jobId": "job_02jk...",
"status": "COMPLETED",
"metadata": {
"units": "mm",
"boundingBox": { "width": 250, "height": 180 }
},
"layersJson": [
{ "name": "OUTLINE", "colorHex": "#ffffff", "entityCount": 6 },
{ "name": "HOLES", "colorHex": "#00bfff", "entityCount": 8 },
{ "name": "DIMS", "colorHex": "#ffff00", "entityCount": 14 }
],
"vectorJson": [
{
"type": "POLYLINE",
"layer": "OUTLINE",
"closed": true,
"vertices": [
{ "x": 0, "y": 0 },
{ "x": 250, "y": 0 },
{ "x": 250, "y": 180 },
{ "x": 0, "y": 180 }
]
},
{
"type": "CIRCLE",
"layer": "HOLES",
"center": { "x": 20, "y": 20 },
"radius": 5
}
],
"imageUrl": "https://cdn.cadlens.co/results/job_02jk.../preview.png?..."
}Free tier includes 50 parse requests per month. No credit card required.