Text-to-CAD

Generate a 3D CAD file from a natural language description.

POST /v1/text-to-cad
Content-Type: application/json
Authorization: Bearer mk_pub_...

Returns 202 Accepted immediately with a job_id. The file is ready asynchronously — retrieve it via polling or webhook.


Request

Body Fields

Field Type Description
prompt string Required. Description of the part to generate. 1–5000 characters.
design_mode string Generation quality tier. Options: "standard" (Default), "pro", "assembly"
output_format string Output file format. One of "STEP" (Default), "STL", "GLB", "3MF".
callback_url string Webhook endpoint (HTTPS). Omit to use polling or dashboard.
metadata object Arbitrary key-value pairs echoed back on the job and webhook payload.

Design Modes

Mode Description
"standard" Fast, best for simple to moderately complex parts and smaller assemblies.
"pro" Deeper reasoning and stronger models. Higher geometric fidelity for complex parts and small to medium assemblies.
"assembly" Agentic workflow and more spatial intelligence for best handling of assemblies with multiple distinct parts.

Output Formats

See output formats for a full description. STEP is recommended for engineering use; STL for 3D printing; GLB for web/AR.


Response

202 Accepted

{
  "job_id": "pub_a1b2c3d4e5f6",
  "status": "queued"
}

Poll GET /v1/jobs/{job_id} or wait for a webhook. See async-jobs.md.


Examples

Simple — Spur Gear

{
  "prompt": "Create a 20mm-thick spur gear with 25 teeth, module of 2, and 10mm-diameter central shaft hole.",
  "output_format": "STEP"
}

Engineering — VESA Mount Adapter

{
  "prompt": "Make a 3mm-thick adapter plate that lets a 75×75mm VESA monitor mount attach to a 100×100mm mount. Include 8 M4 through-holes and countersink the 75mm pattern holes only. Add 0.7mm chamfers.",
  "design_mode": "pro",
  "output_format": "STEP"
}

Assembly — Raspberry Pi Enclosure

{
  "prompt": "Design a snap-fit enclosure for a 65x30x5mm Raspberry Pi Zero, with ventilation slots on the top and a cutout for the micro-USB port on one side.",
  "design_mode": "assembly",
  "output_format": "STEP"
}

Code Examples

curl

curl -X POST https://api.makistry.ai/v1/text-to-cad \
  -H "Authorization: Bearer mk_pub_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Create a 20mm-thick spur gear with 25 teeth, module of 2, and 10mm-diameter central shaft hole.",
    "design_mode": "standard",
    "output_format": "STEP"
  }'

Python

import httpx

resp = httpx.post(
    "https://api.makistry.ai/v1/text-to-cad",
    headers={"Authorization": "Bearer mk_pub_YOUR_KEY"},
    json={
        "prompt": "Create a 20mm-thick spur gear with 25 teeth, module of 2, and 10mm-diameter central shaft hole.",
        "design_mode": "standard",
        "output_format": "STEP",
    },
)
resp.raise_for_status()
job_id = resp.json()["job_id"]

Node.js

const resp = await fetch("https://api.makistry.ai/v1/text-to-cad", {
  method: "POST",
  headers: {
    "Authorization": "Bearer mk_pub_YOUR_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    prompt: "Create a 20mm-thick spur gear with 25 teeth, module of 2, and 10mm-diameter central shaft hole.",
    design_mode: "standard",
    output_format: "STEP",
  }),
});
const { job_id } = await resp.json();

Tips