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 Required Default Description
prompt string Description of the part to generate. 1–5000 characters.
design_mode string "standard" Generation quality tier. See below.
output_format string "STEP" Output file format: "STEP", "STL", "GLB", "3MF".
callback_url string (HTTPS URL) Webhook endpoint. Must be 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 Typical latency
"standard" Single-agent generation. Fast, suitable for simple to moderately complex parts. 30–90 s
"pro" Single-agent with a more capable model. Higher geometric fidelity for complex single parts. 60–180 s
"assembly" Multi-agent: an orchestrator decomposes the design, parallel workers generate each component, an assembler composes the final model. Best for assemblies with multiple distinct parts. 2–10 min

Output Formats

See output-formats.md 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

Hobbyist — Lens Cap

{
  "prompt": "A 60mm diameter lens cap with a 52mm inner retention lip and snap-fit ring, 3mm wall thickness",
  "output_format": "STEP"
}

Engineering — Mounting Bracket

{
  "prompt": "An aluminum L-bracket: 80mm horizontal leg, 60mm vertical leg, both 3mm thick. Two M5 through-holes on the horizontal leg, 20mm from each end, centered on the face. 45-degree triangular gusset on the inner corner.",
  "design_mode": "pro",
  "output_format": "STEP"
}

Assembly — Two-Part Enclosure

{
  "prompt": "A two-part electronics enclosure: base is 100x60x35mm with 2mm walls, four M3 boss inserts at the interior corners (6mm OD, 4mm tall), and a 2mm lip around the top perimeter. Lid is 100x60x10mm with 2mm walls and an inner step that seats on the base lip with 0.2mm clearance.",
  "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": "A 60mm diameter lens cap with a 52mm inner retention lip, 3mm wall thickness",
    "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": "A 60mm diameter lens cap with a 52mm inner retention lip, 3mm wall thickness",
        "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: "A 60mm diameter lens cap with a 52mm inner retention lip, 3mm wall thickness",
    design_mode: "standard",
    output_format: "STEP",
  }),
});
const { job_id } = await resp.json();

Tips