---
title: "Calculate a desensitized 3D printing quote (per-SKU itemised) from weight/volume or an uploaded CAD file. Read-only: no order is created."
method: POST
path: "/tools/quote_calc"
---

# Calculate a desensitized 3D printing quote (per-SKU itemised) from weight/volume or an uploaded CAD file. Read-only: no order is created.

`POST /tools/quote_calc`

## Request

- Base URL: `https://api.mechanofab.com/v1`
- URL: `https://api.mechanofab.com/v1/tools/quote_calc`
- Auth: HTTP bearer

Use this tool to CALCULATE a 3D printing price. Provide material_name, color, lead_time (must match the 3dp-pricing dictionary), quantity, and either weight_g or volume_cm3 — or an uploaded file_key (obtained from /v1/uploads/presign + /v1/uploads/complete) which is parsed to get volume. This tool does NOT create an order; it returns part_price / total / order_url. Output is desensitized (no unit prices).

## Request body

- object
  - `parts` object[], required: One or more part lines. Each line is priced independently.
    - `material_name` string, required: Material name — must match a 3dp-pricing entry (case-insensitive). E.g. 'PA12', 'Resin Standard', 'PEEK'.
    - `color` string, required: Color — must match a 3dp-pricing entry. E.g. 'White', 'Black', 'Natural'.
    - `lead_time` string, required: Lead time tier — must match a 3dp-pricing entry. E.g. 'Standard', 'Express', 'Economy'.
    - `quantity` integer, required: Number of pieces for this part line.
    - `weight_g` number: Single-part weight in grams (preferred). If provided, volume_cm3/file_key are ignored.
    - `volume_cm3` number: Single-part volume in cm³. Weight = volume × density. Required if weight_g/file_key not provided.
    - `file_key` string: R2 object key of a CAD file uploaded by this principal (uploads/{principal_id}/...). Parsed via parse_cad to obtain volume.
    - `notes` string: Optional notes for this part line (e.g. surface finish).
  - `notes` string: Order-level notes (applies to all parts).

## Response `200`

Tool result

- object
  - `success` boolean
  - `line_items` object[]
    - `material_name` string
    - `color` string
    - `lead_time` string
    - `quantity` integer
    - `weight_g` number: Per-piece weight in grams
    - `part_price` number: weight_g × unit_price × qty (USD)
    - `minimum_applied` boolean
    - `subtotal_usd` number
  - `total_usd` number
  - `currency` 'USD'
  - `lead_time` string
  - `valid_until` string: ISO date, 7 days from calculation
  - `order_url` string
  - `contact_url` string
  - `message` string
  - `cad_files` object[]
    - `file_key` string
    - `seconds` number
    - `volume_cm3` number
    - `status` string
  - `error_type` string
  - `llm_hint` string
  - `fuzzy_matches` unknown[]
    - unknown
  - `source_tag` string

## Other responses

- `400`: Invalid request/input.
- `401`: Missing/invalid credentials.
- `402`: Insufficient credits.
- `403`: Scope/tool forbidden.
- `404`: Unknown resource.
- `409`: Idempotency conflict.
- `429`: Rate limited.
- `503`: Control plane / runtime unavailable.

---

[API](https://skmtc.dev/mechanofab/apis/mechanofab-api.md) · [All operations](https://skmtc.dev/mechanofab/apis/mechanofab-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mechanofab/apis/mechanofab-api/revisions/5945a6fad621?raw)
