TechDraw AI

v0.5.0
io.github.MeltFlexDevs/techdrawai Checked 3 days ago Published 11 days ago

Photo or text to technical drawing, DXF/DWG, STL, AI CAD parts (STEP), 3D models and renders.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

generate_technical_drawing Generate a 2D technical drawing

Turn a photograph of a physical object into a dimensioned, standards-compliant 2D technical drawing (orthographic views, dimension lines, projection symbol). Supply the photo as a local file path, an http(s) URL or a data URL. Either let the model estimate real-world dimensions, or pass measurements you actually took so the drawing is anchored to real sizes. Choose the drafting standard (ISO/ANSI), sheet size, projection angle, drawing type and which views to include. Costs 5 credits. The drawing image is saved to disk and its path returned — feed that path to `image_to_dxf` for CAD geometry…

ParameterTypeDescription
image *stringThe product photo: a local file path, an http(s) URL, or a data:image/…;base64,… URL.
drawing_typestringworking = fully dimensioned production drawing (default); assembly = numbered balloons + parts list; as-fitted = record of the item as built; patent = numbered figure, no dimensions.
estimate_dimensionsbooleanLet the model infer realistic real-world dimensions. Defaults to true when no measurements are given, false when they are.
measurementsarrayDimensions actually measured on the object. Every other feature is scaled proportionally from these, so one accurate measurement makes the whole drawing accurate.
notesstringAnything else to state on the drawing (material, finish, tolerances).
output_pathstringWhere to save the drawing. Defaults to ./techdrawai-output/drawing-<timestamp>.png.
paper_sizestringSheet size: A4/A3/A2/A1/A0 for ISO (default A3), or "ANSI A"…"ANSI E" for ANSI (default "ANSI B").
product_namestringWhat the object is, e.g. "oak dining chair". Improves the title block and the estimated dimensions. Use `identify_product` first if you do not know.
projectionstringProjection angle. first-angle (default, ISO/Europe) or third-angle (ANSI/North America).
standardstringDrafting standard. ISO (default) or ANSI.
unitsstringPrimary drawing unit. Defaults to mm.
viewsarrayWhich views to include. Defaults to front, top and side.

text_to_technical_drawing Draw a part from a written description

Turn a description of a part, with its sizes, into a dimensioned 2D technical drawing: orthographic views plus an isometric, dimension lines, centre lines and the projection symbol. No photo needed. Every number in the prompt is drawn as given; sizes the prompt leaves out are estimated and the sheet says UNSTATED DIMENSIONS NOMINAL. So put every size you know in the prompt. The image is the views only, with no border or title block. It is a picture, not CAD geometry: the drawn lines are not to exact scale. Costs 5 credits and takes about 30 to 60 seconds. The drawing is saved to disk and its p…

ParameterTypeDescription
prompt *stringWhat the part is and every size you know, e.g. "Steel L bracket, legs 80 and 60 mm, 40 wide, 5 thick, two 8.5 mm holes in each leg". Name materials and tolerances here too if they belong on the drawin…
output_pathstringWhere to save the drawing. Defaults to ./techdrawai-output/text-drawing-<timestamp>.png.
paper_sizestringISO sheet the views are proportioned for. Defaults to A3.
projectionstringProjection angle. Defaults to first-angle on ISO, third-angle on ANSI.
standardstringDrafting standard. ISO (default) or ANSI (ASME, drawn for an ANSI B sheet).
unitsstringUnits of the bare numbers in the prompt. Omit to read them from the prompt (an inch mark or "in" means inches, otherwise mm).

render_product Render a product from a technical drawing

The reverse of drafting: take a 2D technical drawing and produce a photorealistic image of the finished, manufactured product. The geometry is reconstructed from the views in the drawing, so the render matches the design rather than inventing a new one. Choose the look (photoreal, studio, matte clay, lifestyle), the background, the camera angle and the material/finish. Costs 5 credits. The render is saved to disk and its path returned.

ParameterTypeDescription
image *stringThe technical drawing: a local file path, an http(s) URL, or a data:image/…;base64,… URL. The output of `generate_technical_drawing` works directly.
anglestringCamera angle. Defaults to three-quarter.
backgroundstringwhite (default), gradient, or scene (in context).
materialstringMaterial and finish, e.g. "brushed aluminium, matte black".
notesstringAnything else to emphasise.
output_pathstringWhere to save the render. Defaults to ./techdrawai-output/render-<timestamp>.png.
product_namestringWhat the object is, e.g. "wall bracket". Helps the reconstruction.
stylestringphotoreal = a convincing real photo (default); studio = catalogue lighting on a seamless backdrop; clay = neutral grey to read form; lifestyle = the product in a real setting.

image_to_dxf Convert an image to CAD vector geometry (DXF/DWG)

Trace a raster image — a generated technical drawing, a scan, a sketch, a logo — into real CAD vector contours and write a DXF file. The DXF opens in AutoCAD, Fusion 360, SolidWorks, Onshape, FreeCAD, LibreCAD, Inkscape and the common laser/CNC tools. Set `width_mm` to bring the geometry in at a real-world size instead of one unit per pixel. Set `dwg: true` to also get AutoCAD's native DWG. Free — no credits. Returns the paths of the files written.

ParameterTypeDescription
image *stringThe image to trace: a local file path, an http(s) URL, or a data:image/…;base64,… URL.
dwgbooleanAlso convert to DWG (AutoCAD's native format).
invertbooleanTrace light lines on a dark background.
output_pathstringWhere to save the .dxf. Defaults to ./techdrawai-output/drawing-<timestamp>.dxf. Any DWG is written beside it.
smoothingnumber1 (default) keeps detail; higher values smooth the contours.
thresholdLuminance cut-off between ink and paper. "auto" (default) picks it from the image, which is what photos and shaded renders need. Give a number to force it.
width_mmnumberReal-world width of the result in millimetres. Omit to get one DXF unit per traced pixel.

image_to_stl Convert an image to a 3D printable STL

Trace a raster image — a logo, a sign, a stencil, a line drawing — and extrude it into a solid, watertight binary STL ready to slice and print. The shape is flattened artwork given a thickness, not a reconstruction of a real object: use `photo_to_3d` for that. `size_mm` sets the longest side of the finished model and `thickness_mm` how tall it stands. Free — no credits. Returns the path of the .stl written.

ParameterTypeDescription
image *stringThe image to trace: a local file path, an http(s) URL, or a data:image/…;base64,… URL.
invertbooleanTrace light lines on a dark background.
max_dimnumberLongest traced side in pixels (default 1600). Lowering it is the other way to cut the triangle count.
min_feature_mmnumberDiscard detail finer than this, in millimetres (default 0.3, about a nozzle width). Clears the speckle a traced photograph throws off.
output_pathstringWhere to save the .stl. Defaults to ./techdrawai-output/model-<timestamp>.stl.
size_mmnumberLongest side of the finished model, in millimetres (default 100). The other side follows the artwork's aspect ratio.
smoothingnumber1 (default) keeps detail; higher values smooth the contours, and this is the fastest way to shrink an oversized mesh.
thickness_mmnumberHow tall the extrusion stands, in millimetres (default 3).
thresholdLuminance cut-off between ink and paper. "auto" (default) picks it from the image. Give a number to force it.

text_to_cad Model a CAD part from a description

AI CAD, as on techdrawai.com/app/ai-cad: turn a written description into an exact, editable CAD part: a STEP file for CAD programs (Fusion, SolidWorks, FreeCAD, Onshape), an STL for 3D printing and a 3MF for slicers, modelled by TechDraw AI's AI CAD agent, which writes build123d (OpenCascade) code, runs it, measures the result and checks it against the request. Dimensions are exact, not estimated: put every size the user gave in the prompt. Best for brackets, enclosures, mounts, flanges, adapters, spacers, gears and other mechanical parts. Up to three photos, sketches or drawings can go in `im…

ParameterTypeDescription
prompt *stringThe part: what it is, every dimension in mm, holes, fillets, material.
imagesarrayUp to three photos, sketches or drawings: local file paths, http(s) URLs or data:image URLs.
project_idstringA project_id from an earlier text_to_cad or drawing_to_3d job, to change that part.

drawing_to_3d Model a CAD part from a technical drawing

Turn a technical drawing or a dimensioned sketch into an exact, editable CAD part: a STEP file for CAD programs (Fusion, SolidWorks, FreeCAD, Onshape), an STL for 3D printing and a 3MF for slicers, modelled by TechDraw AI's AI CAD agent, which writes build123d (OpenCascade) code, runs it, measures the result and checks it against the request. The dimensions written on the drawing are used exactly; `notes` carries anything the sheet leaves out. The same AI CAD agent as text_to_cad. Starts a background job (two to eight minutes) and returns a job_id for check_job. Costs 80 credits and requires t…

ParameterTypeDescription
image *stringThe drawing or sketch (JPG, PNG or WebP): a local file path, an http(s) URL, or a data:image URL.
notesstringWhat the part is, and any size the drawing leaves out, in mm.

cad_to_drawing Draw an AI CAD part as a technical drawing

Make a dimensioned technical drawing of a finished AI CAD part (a project_id from text_to_cad or drawing_to_3d): the exact model drawn from every side with its measured sizes, holes and radii, drafted as an ISO A3 sheet. One to two minutes; the PNG is saved to disk and its path returned, and the drawing is saved to the user's TechDraw AI projects for editing. Costs 5 credits and requires the Studio plan.

ParameterTypeDescription
project_id *stringThe CAD part's project_id.
output_pathstringWhere to save the PNG. Defaults to ./techdrawai-output/cad-drawing-<timestamp>.png.

photo_to_3d Reconstruct a textured 3D model from a photo

Turn a photo of one real object (furniture, a product) into a textured 3D mesh, as Photo to 3D CAD on techdrawai.com: GLB, STL, OBJ, FBX and USDZ. It follows the photo's shape and colours, not exact dimensions; for a part with real sizes use text_to_cad. Starts a background job (usually one to five minutes) and returns a job_id for check_job. Costs 80 credits and requires the Studio plan; refunded if it fails.

ParameterTypeDescription
image *stringThe photo (JPG, PNG or WebP): a local file path, an http(s) URL, or a data:image URL.
detailstringMesh density. Default standard.
texturedbooleanColour textures from the photo. Default true.

check_job Check a 3D or CAD job

Report on a job started by text_to_cad, drawing_to_3d or photo_to_3d. While it runs, says so; when it is done, downloads every file (STEP, STL, 3MF for a CAD part; GLB, STL, OBJ, FBX, USDZ for a photo model) to disk and returns the paths. Free. Poll about every 30 seconds.

ParameterTypeDescription
job_id *stringThe job_id the tool returned.
output_dirstringFolder for the files. Defaults to ./techdrawai-output.

identify_product Identify the object in a photo

Name the main object in a photo with a short, specific label (e.g. "L-shaped wall bracket"). Free — no credits. Use it to fill in `product_name` before generating a drawing, which improves both the title block and the estimated dimensions.

ParameterTypeDescription
image *stringThe photo: a local file path, an http(s) URL, or a data:image/…;base64,… URL.

check_credits Check TechDraw AI credits

The authenticated account's credit balance, plan, and what each operation costs. Call it before a batch so you know how far the balance goes.