Open editor
AI tools

AI DXF generator: text to CAD drawing

A panel beside the CADCraft editor that turns a description with sizes into a 2D DXF drawing, then opens it in CADCraft for you to check and edit. It also answers questions about any DXF you open. It runs on OpenAI, Google Gemini or OpenRouter models with your own key; your browser talks to the provider directly.

Open the editor with AI drafting

What can it draw?

Anything 2D that you can describe with sizes. A few prompts that work well:

The model writes the geometry as structured data: lines, polylines with arcs, circles, arcs, text and dimensions on layers such as OUTLINE, CENTER, HIDDEN, DIM and TEXT, in millimetres, centimetres, metres, inches or feet. The panel checks it, drops anything malformed, shows a preview and writes the DXF. Then ask for changes in plain words (“make the holes Ø10”, “add a slot 20 mm long”) and it redraws the whole part.

Models are good at simple, regular parts and weaker at dense layouts, so treat the result as a first draft. Measure it in CADCraft with DIST or LIST before anything is cut or built; the guide to drawing in 2D CAD online covers the editing commands you will want next.

How do you get the DXF into CADCraft?

  1. In the editor, click AI drafting in the top bar. The panel opens on the right.
  2. Open the settings (gear icon), choose a provider and paste your API key. The key field links to the provider’s key page.
  3. On Draw from text, pick an example or describe your drawing, choose units if you like, and press Draw (or Ctrl/⌘+Enter).
  4. Check the preview, then choose Open in CADCraft to open it as a new drawing tab, the same as dropping a DXF on the editor. Insert pastes it into the drawing you have open (CADCraft asks where to place it), and .dxf downloads the file.
  5. Edit it with CADCraft’s own tools and save with File › Save.

Explain a drawing

The second tab answers questions about a DXF. Save the drawing in CADCraft (the download is copied to the panel) or upload a DXF there; opening a DXF file online explains the formats the browser build reads. The panel reads it in your browser and builds a summary: units, extents, layers with object counts and lengths, blocks and how often they are inserted, circle diameters, the largest closed areas, dimension values and every text string. You ask; the model answers from that summary.

The model reads text, not a picture, so it cannot tell you what a shape looks like; it says so and points you to the CADCraft command that can.

Supported providers

ProviderDefault modelGet a key
OpenAIgpt-6.1-solplatform.openai.com
Google Geminigemini-3.8-flashaistudio.google.com
OpenRouteranthropic/claude-sonnet-5.5openrouter.ai
Custom (OpenAI-compatible)any model your API servesyour own endpoint

OpenAI gets the request through its Responses API and Gemini through generateContent, both asked for a JSON answer when drawing. OpenRouter routes it to models from Anthropic, Google, OpenAI, xAI and others. The custom option works with any service that implements OpenAI-style /chat/completions and accepts browser requests. Stronger models draw more reliably; “Load models” in the panel lists what your key can use.

Privacy: what goes where

DataWhere it goes
Your API keyStays in your browser. Sent only to the provider, in the request header.
Drawing requests, and the last drawing for a follow-upSent from your browser straight to the provider you chose. OpenAI requests ask it not to store the response.
Explain a drawingThe text summary and your questions go to the provider. The DXF file itself never leaves your device.
Everything else you do in CADCraftNever leaves your device.
cadcraft.run serversServe the static editor files. They receive none of the above.

The provider’s own terms and data policy apply to what you send them. Drawing text such as client names and addresses is part of the summary; delete that text from a copy of the drawing and ask about the copy if it shouldn’t leave your machine.

FAQ

Is the AI DXF generator free?

cadcraft.run charges nothing and adds no markup, because the request never passes through us. You pay your AI provider for what you use at their normal API prices. A drawing is a short text request and a JSON answer, usually a fraction of a cent to a few cents depending on the model and the size of the drawing.

What kind of drawings can it make?

2D geometry that a model can describe with coordinates: plates and brackets with holes and slots, flanges and gaskets, panels for laser cutting, simple floor plans, borders and title blocks. It draws lines, polylines with arcs, circles, arcs, text and linear or aligned dimensions on named layers. It does not make 3D models, splines, hatches or blocks.

How accurate are the sizes?

As accurate as the model’s arithmetic. Current models get simple parametric parts right most of the time, and slip on complex layouts. Check every size in CADCraft before you cut, print or build anything: DIST, LIST and the Properties palette show exact values, and the dimensions in the drawing measure the real geometry.

Will the DXF open in other CAD and CAM programs?

The panel writes plain ASCII DXF with R12 entities (lines, polylines, circles, arcs, text), the subset nearly every CAD, CAM and laser-cutting program reads. Dimensions in that file are drawn by CADCraft; open it in CADCraft and save it (File › Save) to get a DXF R2000 file with the dimension graphics included.

Where is my API key stored?

In your browser only. By default it lasts for the current tab (sessionStorage). Tick “Remember my key on this device” to keep it in localStorage instead, and use “Forget all keys” in the panel settings to delete it.

What does Explain a drawing send to the AI?

A text summary the panel builds in your browser: format and units, extents, layers with object counts and lengths, blocks, circle diameters, closed areas, dimension values and the drawing’s text. Not the DXF file and not a picture. You can open “What is sent” in the panel to read the exact summary first.

Can it read DWG files?

No. Neither the panel nor CADCraft’s web build reads DWG. Save the drawing as DXF in the CADCraft desktop app (or convert it with cadcraft-cli), then open the DXF here.

Why does a request fail with a CORS or network error?

The custom provider option needs an API that accepts requests from browsers. OpenAI, Google Gemini and OpenRouter all do. Some self-hosted or regional gateways don’t; use one of the built-in providers instead.

Draw your next part from a sentence

Open the editor, paste a key, and describe it in the side panel.

Open AI drafting