Endpoint Reference
Endpoint Reference
All endpoints require an X-API-Key header. Base URL: https://digitalmetal.io/api/v1
/materials
Returns all active casting materials. Use material IDs when creating a quote.
Response
{
"materials": [
{
"id": "uuid",
"name": "Aluminum A356",
"description": "General-purpose casting alloy",
"density_kg_m3": 2680,
"cost_per_kg": 4.20,
"maximum_part_size_mm": "150mm x 150mm x 150mm"
}
]
}/post-processing
Returns all active post-processing / finishing options with pricing.
Response
{
"post_processing_options": [
{
"id": "uuid",
"name": "Powder Coat",
"description": "Durable electrostatic paint finish",
"fixed_cost": 25.00,
"cost_per_area": 0.08,
"unit": "per cm²"
}
]
}/convert
Converts a STEP file to GLB and extracts geometry metadata (volume, surface area, bounding box). The GLB can be used in your own 3D viewer. Use the returned geometry when calling /quotes.
Request — multipart/form-data
| Field | Type | Description |
|---|---|---|
| file | File (required) | .step or .stp, max 25 MB |
Example
curl -X POST https://digitalmetal.io/api/v1/convert \
-H "X-API-Key: dm_live_<your_key>" \
-F "file=@bracket.step"Response 200
{
"geometry": {
"volume_cm3": 12.4503,
"surface_area_cm2": 84.2011,
"bounding_box": {
"x_mm": 48.300,
"y_mm": 32.100,
"z_mm": 21.600
}
},
"glb_base64": "<base64-encoded GLB binary>"
}Error responses
| Status | Cause |
|---|---|
| 400 | Missing or invalid file field |
| 422 | File contains multiple bodies (split and upload separately) |
| 422 | Part exceeds 150 mm build volume limit |
| 422 | Geometry could not be extracted from file |
/quotes
Creates a quote and returns a full pricing breakdown. Geometry data comes from /convert. The quote is saved to your account and can be retrieved later.
Request body — application/json
| Field | Type | Description |
|---|---|---|
| file_name | string (required) | Display name for the part |
| geometry | object (required) | volume_cm3, surface_area_cm2, bounding_box (from /convert) |
| material_id | string (required) | UUID from /materials |
| quantity | number (required) | 1–10,000 |
| post_processing_ids | string[] (optional) | UUIDs from /post-processing |
Example
curl -X POST https://digitalmetal.io/api/v1/quotes \
-H "X-API-Key: dm_live_<your_key>" \
-H "Content-Type: application/json" \
-d '{
"file_name": "bracket.step",
"geometry": {
"volume_cm3": 12.4503,
"surface_area_cm2": 84.2011,
"bounding_box": { "x_mm": 48.3, "y_mm": 32.1, "z_mm": 21.6 }
},
"material_id": "a1b2c3d4-...",
"quantity": 25,
"post_processing_ids": ["e5f6g7h8-..."]
}'Response 200
{
"quote_id": "uuid",
"pricing": {
"unit_price": 142.50,
"quote_total": 3562.50,
"minimum_charge_applied": false,
"breakdown": {
"shell_cost": 38.20,
"material_cost": 52.10,
"postprocessing_fixed_cost": 25.00,
"postprocessing_area_cost": 6.74,
"flat_labor_cost": 50.00,
"subtotal": 172.04,
"quote_total": 3562.50
}
},
"lead_time": {
"min_days": 5,
"max_days": 7,
"formatted_range": "5–7 Business Days"
},
"material": {
"id": "uuid",
"name": "Aluminum A356",
"density_kg_m3": 2680,
"cost_per_kg": 4.20
},
"post_processing": [
{
"id": "uuid",
"name": "Powder Coat",
"fixed_cost": 25.00,
"cost_per_area": 0.08
}
]
}/quotes/:id
Retrieves a previously created quote. Only quotes created by the authenticated user are accessible.
Example
curl https://digitalmetal.io/api/v1/quotes/a1b2c3d4-... \
-H "X-API-Key: dm_live_<your_key>"Response 200
{
"quote": {
"id": "uuid",
"file_name": "bracket.step",
"status": "draft",
"created_at": "2026-04-13T00:00:00.000Z",
"volume_cm3": 12.4503,
"surface_area_cm2": 84.2011,
"bounding_box_x_mm": 48.3,
"bounding_box_y_mm": 32.1,
"bounding_box_z_mm": 21.6,
"material_id": "uuid",
"quantity": 25,
"unit_price": 142.50,
"total_price": 3562.50,
"materials": {
"id": "uuid",
"name": "Aluminum A356",
"density_kg_m3": 2680,
"cost_per_kg": 4.20
}
}
}Common error codes
| Status | Meaning |
|---|---|
| 400 | Missing or invalid request parameters |
| 401 | API key missing, invalid, or revoked |
| 404 | Resource not found or not owned by your account |
| 422 | Request was valid but could not be processed (e.g. geometry extraction failed) |
| 429 | API key limit reached (max 10 active keys) |
| 500 | Internal server error |
| 502 | Upstream conversion service unavailable |
| 503 | Pricing configuration unavailable |